data race in remove_proc_entry()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi. I found a suspected bug in proc file system

At proc/generic.c line 806,  de->subdir is not protected by
spin_lock(&proc_subdir_lock)
so that data races might occur.

Line 806 must be protected by spin_lock(&proc_subdir_lock) to avoid data race.

WARN(condition , stmt) is translated into if (condition) { stmt }.
At line 806, a context switching can happen right after the condition checking
and another thread may set 'de->subdir' as a null.
In this case, the execution of 'stmt' would occur null pointer dereference error
since it has 'de->subdir->name'.

Sincerely,
Shin Hong
M.S. Candidate
Computer Science Div., EECS Dept.,
Korea Advanced Institute of Sci. & Tech.,
Republic of Korea
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux