lkml.org 
[lkml]   [2021]   [Oct]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [patch v8 0/7] handle unexpected message from server
Date
On Thu, 16 Sep 2021 17:33:43 +0800, Yu Kuai wrote:
> This patch set tries to fix that client might oops if nbd server send
> unexpected message to client, for example, our syzkaller report a uaf
> in nbd_read_stat():
>
> Call trace:
> dump_backtrace+0x0/0x310 arch/arm64/kernel/time.c:78
> show_stack+0x28/0x38 arch/arm64/kernel/traps.c:158
> __dump_stack lib/dump_stack.c:77 [inline]
> dump_stack+0x144/0x1b4 lib/dump_stack.c:118
> print_address_description+0x68/0x2d0 mm/kasan/report.c:253
> kasan_report_error mm/kasan/report.c:351 [inline]
> kasan_report+0x134/0x2f0 mm/kasan/report.c:409
> check_memory_region_inline mm/kasan/kasan.c:260 [inline]
> __asan_load4+0x88/0xb0 mm/kasan/kasan.c:699
> __read_once_size include/linux/compiler.h:193 [inline]
> blk_mq_rq_state block/blk-mq.h:106 [inline]
> blk_mq_request_started+0x24/0x40 block/blk-mq.c:644
> nbd_read_stat drivers/block/nbd.c:670 [inline]
> recv_work+0x1bc/0x890 drivers/block/nbd.c:749
> process_one_work+0x3ec/0x9e0 kernel/workqueue.c:2147
> worker_thread+0x80/0x9d0 kernel/workqueue.c:2302
> kthread+0x1d8/0x1e0 kernel/kthread.c:255
> ret_from_fork+0x10/0x18 arch/arm64/kernel/entry.S:1174
>
> [...]

Applied, thanks!

[1/7] nbd: don't handle response without a corresponding request message
commit: b5644a3a79bf3be5f1238db1b2f241374b27b0f0
[2/7] nbd: make sure request completion won't concurrent
commit: d14b304f558f8c8f53da3a8d0c0b671f14a9c2f4
[3/7] nbd: check sock index in nbd_read_stat()
commit: dbd73178da676945d8bbcf6afe731623f683ce0a
[4/7] nbd: don't start request if nbd_queue_rq() failed
commit: a83fdc85365586dc5c0f3ff91680e18e37a66f19
[5/7] nbd: clean up return value checking of sock_xmit()
commit: 6157a8f489909db00151a4e361903b9099b03b75
[6/7] nbd: partition nbd_read_stat() into nbd_read_reply() and nbd_handle_reply()
commit: 961e9f50be9bb47835b0ac7e08d55d2d0a45e493
[7/7] nbd: fix uaf in nbd_handle_reply()
commit: 52c90e0184f67eecb00b53b79bfdf75e0274f8fd

Best regards,
--
Jens Axboe


\
 
 \ /
  Last update: 2021-10-17 15:10    [W:0.235 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site