Jann Horn 3e0a396546 xfs: fix type confusion in xfs_ioc_swapext
Without this check, the following XFS_I invocations would return bad
pointers when used on non-XFS inodes (perhaps pointers into preceding
allocator chunks).

This could be used by an attacker to trick xfs_swap_extents into
performing locking operations on attacker-chosen structures in kernel
memory, potentially leading to code execution in the kernel.  (I have
not investigated how likely this is to be usable for an attack in
practice.)

Signed-off-by: Jann Horn <jann@thejh.net>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Dave Chinner <david@fromorbit.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2016-07-16 06:30:06 +09:00
..
2016-05-26 10:13:40 -07:00
2014-07-30 09:12:05 +10:00
2016-04-06 09:47:01 +10:00
2016-04-06 09:47:01 +10:00
2016-03-18 11:42:53 -04:00
2013-05-07 18:45:36 -05:00
2011-08-12 16:21:35 -05:00
2012-11-19 20:11:24 -06:00
2016-03-31 00:30:15 -04:00
2016-05-26 10:13:40 -07:00
2016-05-26 19:34:26 -07:00
2011-08-12 16:21:35 -05:00
2015-06-22 09:44:02 +10:00
2011-08-12 16:21:35 -05:00
2016-05-26 19:34:26 -07:00
2013-08-12 16:56:06 -05:00
2016-02-09 16:54:58 +11:00
2016-04-06 09:20:36 +10:00
2016-04-06 09:20:36 +10:00
2016-04-06 09:20:36 +10:00
2013-05-07 18:45:36 -05:00
2016-05-26 10:13:40 -07:00
2016-05-26 10:13:40 -07:00
2016-05-26 10:13:40 -07:00
2016-03-18 11:42:53 -04:00
2016-04-06 09:19:55 +10:00
2016-05-26 19:34:26 -07:00
2016-04-06 09:20:36 +10:00
2013-05-07 18:45:36 -05:00