VirtualBox

Opened 7 years ago

Last modified 7 years ago

#16837 closed defect

sf_path_from_dentry: null pointer deference on failed kmalloc allocation — at Initial Version

Reported by: ColinIanKing Owned by:
Component: other Version: VirtualBox 5.1.22
Keywords: kmalloc null check failure Cc:
Guest type: Linux Host type: Linux

Description

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:

out_bound_len = PATH_MAX; out = kmalloc(out_bound_len, GFP_KERNEL); name = out;

..and later it is dereferenced leading to a potential NULL pointer dereference crash.

LogFunc(("result(%d) = %.*s\n", len, len, name)); *out = 0;

I suggest that the kmalloc failure case needs to be handled correctly.

Change History (0)

Note: See TracTickets for help on using tickets.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette