VirtualBox

Changes between Initial Version and Version 1 of Ticket #16836


Ignore:
Timestamp:
Jun 21, 2017 9:07:34 AM (7 years ago)
Author:
Frank Mehnert
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #16836 – Description

    initial v1  
    11Function sf_unlink_aux() in vboxsf/dirops.c performs a dereference on dentry with the following call:
    2 
     2{{{
    33    err = sf_path_from_dentry(__func__, sf_g, sf_i, dentry, &path);
    4 
     4}}}
    55However, a few statements later dentry is being checked to see if it is a NULL pointer:
    6 
     6{{{
    77    if (   dentry
    88        && dentry->d_inode
    99        && ((dentry->d_inode->i_mode & S_IFLNK) == S_IFLNK))
    1010        fFlags |= SHFL_REMOVE_SYMLINK;
    11 
     11}}}
    1212Either that null pointer check is redundant or it dentry really could be NULL, in which case the earlier call to sf_path_from_dentry with a null dentry can trip a null pointer deference bug on dentry.
    1313
    1414Anyhow, the current code looks suspect and should be fixed.
    15 

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