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-01-20 17:09:18 -08:00
2016-05-27 15:26:11 -07:00
2016-05-20 17:58:30 -07:00
2016-04-26 12:00:48 -04:00
2015-11-13 21:53:18 -08:00
2016-01-22 18:04:28 -05:00
2016-06-23 00:29:53 +02:00
2016-05-23 17:04:14 -07:00
2016-01-22 18:04:28 -05:00
2016-01-22 18:04:28 -05:00
2016-05-26 19:34:26 -07:00
2016-06-07 22:07:09 -04:00
2016-06-27 12:18:44 -07:00
2016-06-10 11:32:47 -04:00
2016-01-22 18:04:28 -05:00
2016-05-23 17:04:14 -07:00
2016-06-20 17:11:29 -04:00
2016-07-01 10:24:18 -04:00
2016-06-24 12:11:34 -04:00
2016-04-18 11:18:55 +02:00
2016-01-22 18:04:28 -05:00