Repository navigation
Conversation
|
Upstream branch: c03c1a1 |
90ea7e4 to
435b194
Compare
|
Upstream branch: 7be4bc5 |
2cc264a to
e2f7353
Compare
435b194 to
fd67522
Compare
|
Upstream branch: 17bb0e2 |
e2f7353 to
b0ee2e3
Compare
fd67522 to
3b53a63
Compare
|
Upstream branch: 21a7f44 |
b0ee2e3 to
1e627aa
Compare
3b53a63 to
5d84576
Compare
|
Upstream branch: 6b4b543 |
1e627aa to
6599e02
Compare
5d84576 to
6582ed2
Compare
|
Upstream branch: fb2c3f4 |
6599e02 to
28204eb
Compare
6582ed2 to
b3a1abc
Compare
|
Upstream branch: d135ab4 |
28204eb to
9165b4d
Compare
b3a1abc to
712496f
Compare
|
Upstream branch: c339f40 |
9165b4d to
b29912c
Compare
712496f to
a186880
Compare
|
Upstream branch: d89e1d1 |
b29912c to
e945d5c
Compare
a186880 to
46206a3
Compare
|
Upstream branch: 6628e7d |
e945d5c to
a6798f1
Compare
46206a3 to
220bd96
Compare
|
Upstream branch: 05441d6 |
a6798f1 to
c63eb97
Compare
220bd96 to
6c4625e
Compare
|
Upstream branch: f66469d |
c63eb97 to
341b410
Compare
6c4625e to
c7f678d
Compare
|
Upstream branch: d487237 |
341b410 to
1a5784a
Compare
c7f678d to
6aa6cd1
Compare
receive_DataRequest() sizes the digest buffer of P_CSUM_RS_REQUEST and P_OV_REPLY packets from the length the peer puts in the packet header, without checking it against the digest size of the negotiated csums-alg or verify-alg. w_e_end_csum_rs_req() and w_e_end_ov_reply() later memcmp() crypto_shash_digestsize() bytes of that buffer; the D_ASSERT() on the size only logs a message. A peer that sends a shorter digest thus causes a slab-out-of-bounds read in the worker, and a peer that declares a huge length makes the receiver attempt an oversized kmalloc() that triggers a page allocator warning. BUG: KASAN: slab-out-of-bounds in memcmp (lib/string.c:676) Read of size 8 at addr ff11000007b9d630 by task drbd_w_r0/601 Call Trace: memcmp (lib/string.c:676) w_e_end_csum_rs_req (drivers/block/drbd/drbd_worker.c:1182) drbd_worker (drivers/block/drbd/drbd_worker.c:2189) drbd_thread_setup (drivers/block/drbd/drbd_main.c:314) kthread (kernel/kthread.c:436) ret_from_fork (arch/x86/kernel/process.c:158) ret_from_fork_asm (arch/x86/entry/entry_64.S:245) Allocated by task 605: __kmalloc_noprof (mm/slub.c:5439) receive_DataRequest (drivers/block/drbd/drbd_receiver.c:2715) drbd_receiver (drivers/block/drbd/drbd_receiver.c:5371) drbd_thread_setup (drivers/block/drbd/drbd_main.c:314) kthread (kernel/kthread.c:436) Reject the packet and drop the connection unless the declared digest length matches the digest size of the corresponding transform, or if no such transform is configured. Fixes: b411b36 ("The DRBD driver") Cc: stable@vger.kernel.org Reported-by: co+0845f49852fd568f@bugs.sh Signed-off-by: Yibo Liu <yiboliume@gmail.com>
|
Upstream branch: b3dfbde |
1a5784a to
acf1699
Compare
Pull request for series with
subject: drbd: validate digest size in checksum resync and verify requests
version: 2
url: https://patchwork.kernel.org/series/1189972/