VirtualBox

Changeset 38922 in vbox


Ignore:
Timestamp:
Sep 30, 2011 2:58:49 PM (13 years ago)
Author:
vboxsync
Message:

Additions/solaris/SharedFolders: MMAP fix for non-zero reused pages.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/solaris/SharedFolders/vboxfs_vnode.c

    r38901 r38922  
    15421542                uint32_t bytes = PAGESIZE;
    15431543                error = sfprov_read(node->sf_file, virtaddr, io_off, &bytes);
     1544                /*
     1545                 * If we reuse pages without zero'ing them, one process can mmap() and read-past the length
     1546                 * to read previously mmap'd contents (from possibly other processes).
     1547                 */
     1548                if (error == 0 && bytes < PAGESIZE)
     1549                        memset(virtaddr + bytes, 0, PAGESIZE - bytes);
    15441550                sffs_page_unmap(pcur, virtaddr);
    15451551                if (error != 0)
Note: See TracChangeset for help on using the changeset viewer.

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