]> git.baikalelectronics.ru Git - kernel.git/commit
ext4: check to make sure the rename(2)'s destination is not freed
authorTheodore Ts'o <tytso@mit.edu>
Mon, 27 Aug 2018 05:47:09 +0000 (01:47 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 27 Aug 2018 05:47:09 +0000 (01:47 -0400)
commite5123ce1bb677ae0f9e2a57b19cf6c5e3e419b58
treeb848cc5a2dce967053f7e1c63ee782e619100b07
parent6d800bec6bb01921d066afc089c7944763a751c4
ext4: check to make sure the rename(2)'s destination is not freed

If the destination of the rename(2) system call exists, the inode's
link count (i_nlinks) must be non-zero.  If it is, the inode can end
up on the orphan list prematurely, leading to all sorts of hilarity,
including a use-after-free.

https://bugzilla.kernel.org/show_bug.cgi?id=200931

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Reported-by: Wen Xu <wen.xu@gatech.edu>
Cc: stable@vger.kernel.org
fs/ext4/namei.c