Files
twx-linux/drivers/scsi
Al Viro 65de8bfbbe Fix missing sanity check in /dev/sg
commit 137d01df51 upstream.

What happens is that a write to /dev/sg is given a request with non-zero
->iovec_count combined with zero ->dxfer_len.  Or with ->dxferp pointing
to an array full of empty iovecs.

Having write permission to /dev/sg shouldn't be equivalent to the
ability to trigger BUG_ON() while holding spinlocks...

Found by Dmitry Vyukov and syzkaller.

[ The BUG_ON() got changed to a WARN_ON_ONCE(), but this fixes the
  underlying issue.  - Linus ]

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Reported-by: Dmitry Vyukov <dvyukov@google.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-23 17:43:09 +01:00
..
2016-04-12 09:08:39 -07:00
2015-11-09 17:11:57 -08:00
…
2015-11-09 17:11:57 -08:00
2015-11-12 07:06:18 -05:00
2015-11-12 07:06:18 -05:00
2015-11-12 07:06:18 -05:00
2015-04-27 10:10:19 -07:00
2015-04-27 10:04:39 -07:00
2015-04-27 10:04:39 -07:00
2015-04-27 10:05:55 -07:00
2015-04-27 10:05:55 -07:00
2016-07-27 09:47:39 -07:00
…
…
…
…
…
2015-12-03 09:32:33 -08:00
…
2015-04-17 10:13:56 -07:00
…
2014-11-20 09:11:11 +01:00
2015-07-31 13:31:10 +02:00
2014-07-17 22:07:37 +02:00
2014-11-20 09:11:10 +01:00
2014-11-20 09:11:10 +01:00
2015-11-09 17:11:57 -08:00
2014-11-24 16:13:16 +01:00
…
2015-11-09 16:32:14 -08:00
2014-11-20 09:11:10 +01:00
…
…
…
2015-12-03 09:32:33 -08:00
2015-11-09 12:39:28 -05:00
2015-11-09 12:39:28 -05:00
…
…
…
2015-11-09 19:32:41 -05:00
2015-06-02 17:24:54 -07:00
…
2015-12-03 09:32:33 -08:00
…
…
…
…
…
2014-07-17 22:07:35 +02:00
…
2014-11-24 20:01:28 +01:00
…
2014-11-20 09:11:10 +01:00
2014-11-20 09:11:10 +01:00
2015-11-12 07:06:18 -05:00
…
…
…
2016-10-28 03:01:31 -04:00
2015-11-09 17:11:57 -08:00
…
2017-02-23 17:43:09 +01:00
…
2014-07-17 22:07:39 +02:00
2016-02-25 12:01:16 -08:00
2014-11-12 11:15:57 +01:00
2015-12-03 09:32:33 -08:00
2015-06-02 08:03:25 -07:00
2015-11-09 17:42:19 -08:00
2014-11-20 09:11:15 +01:00
2014-11-20 09:11:10 +01:00
2014-11-20 09:11:10 +01:00
…
…