Ticket #7705 (closed defect: fixed)
Memory leak in sf_lookup (vboxsf.ko module) => Fixed in SVN
|Reported by:||spectre||Owned by:|
A small memory leak seems to happen in the kernel module from VirtualBox Guest Additions (Linux) responsible for shared folder support (vboxsf.ko).
Consider sf_lookup() function from dirops.c (SVN: trunk/src/VBox/Additions/linux/sharedfolders/dirops.c, revision 33540).
The call to sf_path_from_dentry() allocates memory for 'path' structure and fills it appropriately. But if the call to sf_stat() located just below in sf_lookup() returns -ENOENT, that memory will probably never be freed.
This happens if some process tries to access a non-existent entry in the shared folders: a file that is about to be created or is simply missing, etc.
To make it clearer, here are two (of possibly many) ways of how the problem could be reproduced (assume 'vbshare' is the device for a shared folder and that folder contains neither 'aaa' subfolder nor 'ccc.txt' file).
# mount -t vboxsf vbshare /mnt/shared # ls /mnt/shared/aaa # umount vbshare
8 bytes are leaked.
# mount -t vboxsf vbshare /mnt/shared # echo 123 > /mnt/shared/ccc.txt # umount vbshare
12 bytes are leaked.
Host OS: Windows XP SP3 Pro x86
Guest OS: OpenSuSE Linux 11.3 x86
- Summary changed from Memory leak in sf_lookup (vboxsf.ko module) to Memory leak in sf_lookup (vboxsf.ko module) => Fixed in SVN