Changes between Initial Version and Version 1 of Ticket #16837
- Timestamp:
- Jun 20, 2017 12:01:47 PM (7 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #16837
- Property Status new → closed
- Property Resolution → invalid
-
Ticket #16837 – Description
initial v1 1 1 Function sf_path_from_dentry in src/VBox/Additions/linux/sharedfolders/utils.c is allocating a buffer using kmalloc but it does not check if the allocation failed: 2 2 {{{ 3 3 out_bound_len = PATH_MAX; 4 4 out = kmalloc(out_bound_len, GFP_KERNEL); 5 5 name = out; 6 6 }}} 7 7 ..and later it is dereferenced leading to a potential NULL pointer dereference crash. 8 8 {{{ 9 9 LogFunc(("result(%d) = %.*s\n", len, len, name)); 10 10 *out = 0; 11 11 }}} 12 12 I suggest that the kmalloc failure case needs to be handled correctly.

