VirtualBox

Ticket #8185 (closed defect: fixed)

Opened 12 years ago

Last modified 12 years ago

Possible memory leak in sf_follow_link (vboxsf.ko module) => Fixed in SVN

Reported by: spectre Owned by:
Component: shared folders Version: VirtualBox 4.0.2
Keywords: Cc:
Guest type: Linux Host type: Windows

Description

There is a possibility for a memory leak in sf_follow_link() function (src/VBox/Additions/linux/sharedfolders/lnkops.c).

The page allocated there via get_zeroed_page(GFP_KERNEL) will probably never be freed if vboxReadLink() fails. This happens, for example, when the shared folder contains a Windows symlink (a junction, to be exact) to a directory and one tries to list the contents of that directory from the guest or just cd to it via the link.

If I understand correctly what happens there, neither vboxReadLink() nor sf_follow_link() free that page, so it remains allocated and the pointer to it is lost when sf_follow_link() ends.

Host: Windows XP SP3 x86
Guest: OpenSUSE 11.3 x86
Guest Additions: 4.0.3 (r69551)

Attached are the VM log, VM configuration and the file with the call stacks of the memory leaks of this kind.

This problem as well as those reported in tickets #7705 and #7720 was detected by  KEDR analysis system for Linux kernel modules.

Attachments

VBox.log Download (98.4 KB) - added by spectre 12 years ago.
VM log
OS113-x86-testbox.xml Download (17.6 KB) - added by spectre 12 years ago.
VM configuration
possible_leaks.log Download (1003 bytes) - added by spectre 12 years ago.
Technical data about the leaks

Change History

Changed 12 years ago by spectre

VM log

Changed 12 years ago by spectre

VM configuration

Changed 12 years ago by spectre

Technical data about the leaks

comment:1 Changed 12 years ago by frank

  • Summary changed from Possible memory leak in sf_follow_link (vboxsf.ko module) to Possible memory leak in sf_follow_link (vboxsf.ko module) => Fixed in SVN

That is absolutely correct. Thanks for this hint and thanks for the link! Fixed in r35854.

comment:2 Changed 12 years ago by spectre

Great! I'm glad it was helpful.

comment:3 Changed 12 years ago by frank

  • Status changed from new to closed
  • Resolution set to fixed
Note: See TracTickets for help on using tickets.

www.oracle.com
ContactPrivacy policyTerms of Use