Patch "do_last(): don't let a bogus return value from ->open() et.al. to confuse us" has been added to the 3.10-stable tree
Subsystems (2)
This is a note to let you know that I've just added the patch titled
do_last(): don't let a bogus return value from ->open() et.al. to confuse us
to the 3.10-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
do_last-don-t-let-a-bogus-return-value-from-open-et.al.-to-confuse-us.patch
and it can be found in the queue-3.10 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
c80567c82ae4814a41287618e315a60ecf513be6Mon Sep 17 00:00:00 2001
From: Al Viro <[email protected]>
Date: Sat, 27 Feb 2016 19:17:33 -0500
Subject: do_last(): don't let a bogus return value from ->open() et.al. to confuse us
From: Al Viro <[email protected]>
commit c80567c82ae4814a41287618e315a60ecf513be6 upstream.
... into returning a positive to path_openat(), which would interpret that as "symlink had been encountered" and proceed to corrupt memory, etc. It can only happen due to a bug in some ->open() instance or in some LSM hook, etc., so we report any such event *and* make sure it doesn't trick us into further unpleasantness.
--- fs/namei.c | 4 ++++ 1 file changed, 4 insertions(+)
fs/namei.c +4 -0
@@ -2917,6 +2917,10 @@ opened: goto exit_fput; } out: +if (unlikely (error >0 )) { +WARN_ON (1 ); + error = -EINVAL ; + }if (got_write)mnt_drop_write (nd->path.mnt);path_put (&save_parent);
Patches currently in stable-queue which might be from [email protected] are
queue-3.10/vfs-avoid-softlockups-with-sendfile-2.patch queue-3.10/do_last-don-t-let-a-bogus-return-value-from-open-et.al.-to-confuse-us.patch queue-3.10/uml-fix-hostfs-mknod.patch