Bart Van Assche
a1ae7d0345
RDMA/core: Avoid that ib_drain_qp() triggers an out-of-bounds stack access
...
This patch fixes the following KASAN complaint:
==================================================================
BUG: KASAN: stack-out-of-bounds in rxe_post_send+0x77d/0x9b0 [rdma_rxe]
Read of size 8 at addr ffff880061aef860 by task 01/1080
CPU: 2 PID: 1080 Comm: 01 Not tainted 4.16.0-rc3-dbg+ #2
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.0.0-prebuilt.qemu-project.org 04/01/2014
Call Trace:
dump_stack+0x85/0xc7
print_address_description+0x65/0x270
kasan_report+0x231/0x350
rxe_post_send+0x77d/0x9b0 [rdma_rxe]
__ib_drain_sq+0x1ad/0x250 [ib_core]
ib_drain_qp+0x9/0x30 [ib_core]
srp_destroy_qp+0x51/0x70 [ib_srp]
srp_free_ch_ib+0xfc/0x380 [ib_srp]
srp_create_target+0x1071/0x19e0 [ib_srp]
kernfs_fop_write+0x180/0x210
__vfs_write+0xb1/0x2e0
vfs_write+0xf6/0x250
SyS_write+0x99/0x110
do_syscall_64+0xee/0x2b0
entry_SYSCALL_64_after_hwframe+0x42/0xb7
The buggy address belongs to the page:
page:ffffea000186bbc0 count:0 mapcount:0 mapping:0000000000000000 index:0x0
flags: 0x4000000000000000()
raw: 4000000000000000 0000000000000000 0000000000000000 00000000ffffffff
raw: 0000000000000000 ffffea000186bbe0 0000000000000000 0000000000000000
page dumped because: kasan: bad access detected
Memory state around the buggy address:
ffff880061aef700: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffff880061aef780: 00 00 00 00 00 00 00 00 00 00 00 f1 f1 f1 f1 00
>ffff880061aef800: f2 f2 f2 f2 f2 f2 f2 00 00 00 00 00 f2 f2 f2 f2
^
ffff880061aef880: f2 f2 f2 00 00 00 00 00 00 00 00 00 00 00 f2 f2
ffff880061aef900: f2 f2 f2 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================
Fixes: 765d67748bcf ("IB: new common API for draining queues")
Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com>
Cc: Steve Wise <swise@opengridcomputing.com>
Cc: Sagi Grimberg <sagi@grimberg.me>
Cc: stable@vger.kernel.org
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
2018-03-06 16:00:51 -07:00
..
2018-02-11 14:34:03 -08:00
2018-02-11 14:34:03 -08:00
2018-02-06 09:59:40 -08:00
2018-02-08 15:05:16 -05:00
2018-02-09 09:40:33 -08:00
2018-01-19 22:59:33 -05:00
2018-02-08 11:38:59 -08:00
2018-02-11 14:34:03 -08:00
2018-02-01 16:35:31 -08:00
2018-02-11 14:34:03 -08:00
2018-02-07 11:22:44 -08:00
2018-02-08 10:21:39 +01:00
2018-02-02 10:01:04 -08:00
2018-02-10 13:16:35 -08:00
2018-02-03 00:26:10 -07:00
2018-02-02 09:50:51 -08:00
2018-02-11 14:34:03 -08:00
2018-01-23 09:04:10 +01:00
2018-02-11 14:34:03 -08:00
2018-02-08 10:44:25 -08:00
2018-02-11 14:34:03 -08:00
2018-02-11 14:34:03 -08:00
2018-02-11 14:34:03 -08:00
2018-02-11 14:34:03 -08:00
2018-02-11 14:34:03 -08:00
2018-01-27 09:34:22 -08:00
2018-02-01 10:31:17 -08:00
2018-02-04 10:57:43 -08:00
2018-02-06 09:59:40 -08:00
2018-02-11 14:34:03 -08:00
2018-03-06 16:00:51 -07:00
2018-02-11 14:34:03 -08:00
2018-02-08 12:03:54 -08:00
2018-02-06 09:59:40 -08:00
2018-02-11 14:34:03 -08:00
2018-02-11 14:34:03 -08:00
2018-02-11 14:34:03 -08:00
2018-02-11 14:34:03 -08:00
2018-02-11 14:34:03 -08:00
2018-02-11 14:34:03 -08:00
2018-02-01 16:35:31 -08:00
2018-01-17 01:19:38 -05:00
2018-02-11 14:34:03 -08:00
2018-02-11 14:34:03 -08:00
2018-02-09 19:32:41 -08:00
2018-01-31 11:32:27 -08:00
2018-02-01 10:31:17 -08:00
2018-02-23 12:36:39 -08:00
2018-01-28 22:17:24 -05:00
2018-01-16 16:47:29 +01:00
2018-02-03 00:26:26 -07:00
2018-02-04 11:16:35 -08:00
2018-02-06 09:59:40 -08:00
2018-02-11 14:34:03 -08:00
2018-02-08 11:48:49 -08:00
2018-02-06 18:32:44 -08:00
2018-02-01 09:40:49 -08:00
2018-02-02 14:22:53 -08:00
2018-02-11 14:34:03 -08:00
2018-01-31 12:55:31 -08:00
2018-01-17 12:56:24 +01:00
2018-02-11 14:34:03 -08:00
2018-02-11 14:34:03 -08:00
2018-02-11 14:34:03 -08:00
2018-01-23 12:17:42 -06:00
2018-01-30 12:25:59 +00:00
2018-02-05 10:07:40 -08:00
2018-02-11 14:34:03 -08:00
2018-02-11 14:34:03 -08:00
2018-02-11 14:34:03 -08:00
2018-02-06 09:59:40 -08:00
2018-02-11 14:34:03 -08:00
2018-02-08 10:21:39 +01:00
2018-02-01 16:35:31 -08:00
2018-01-22 16:45:26 +01:00
2018-01-26 17:57:34 +00:00
2018-02-01 10:37:39 +02:00
2018-02-11 14:34:03 -08:00
2018-02-09 14:49:46 -08:00
2018-02-06 15:04:58 -08:00
2018-02-11 14:34:03 -08:00
2018-02-11 14:34:03 -08:00
2018-02-11 14:34:03 -08:00
2018-02-11 14:34:03 -08:00
2018-02-11 14:34:03 -08:00
2018-02-09 19:32:41 -08:00
2018-02-11 14:34:03 -08:00
2018-02-01 16:26:45 +02:00
2018-01-31 19:25:25 -08:00
2018-02-07 11:54:34 -08:00
2018-02-11 14:34:03 -08:00
2018-02-01 10:31:17 -08:00
2018-02-06 09:59:40 -08:00