All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3 v2] 9p: Fix write overflow in p9_read_work
@ 2022-11-17  9:11 GUO Zihua
  2022-11-17  9:11 ` [PATCH 1/3 " GUO Zihua
                   ` (4 more replies)
  0 siblings, 5 replies; 11+ messages in thread
From: GUO Zihua @ 2022-11-17  9:11 UTC (permalink / raw)
  To: ericvh, lucho, asmadeus, linux_oss
  Cc: davem, edumazet, kuba, pabeni, v9fs-developer, netdev

This patchset fixes the write overflow issue in p9_read_work. As well as
some follow up cleanups.

BUG: KASAN: slab-out-of-bounds in _copy_to_iter+0xd35/0x1190
Write of size 4043 at addr ffff888008724eb1 by task kworker/1:1/24

CPU: 1 PID: 24 Comm: kworker/1:1 Not tainted 6.1.0-rc5-00002-g1adf73218daa-dirty #223
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.15.0-0-g2dd4b9b3f840-prebuilt.qemu.org 04/01/2014
Workqueue: events p9_read_work
Call Trace:
 <TASK>
 dump_stack_lvl+0x4c/0x64
 print_report+0x178/0x4b0
 kasan_report+0xae/0x130
 kasan_check_range+0x179/0x1e0
 memcpy+0x38/0x60
 _copy_to_iter+0xd35/0x1190
 copy_page_to_iter+0x1d5/0xb00
 pipe_read+0x3a1/0xd90
 __kernel_read+0x2a5/0x760
 kernel_read+0x47/0x60
 p9_read_work+0x463/0x780
 process_one_work+0x91d/0x1300
 worker_thread+0x8c/0x1210
 kthread+0x280/0x330
 ret_from_fork+0x22/0x30
 </TASK>

GUO Zihua (3):
  9p: Fix write overflow in p9_read_work
  9p: Remove redundent checks for message size against msize.
  9p: Use P9_HDRSZ for header size

 net/9p/trans_fd.c | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

---

v2:
  Addition log for debugging similar issues, as well as cleanups according to
  Dominique's comment.
-- 
2.17.1


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2022-11-18 15:35 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-17  9:11 [PATCH 0/3 v2] 9p: Fix write overflow in p9_read_work GUO Zihua
2022-11-17  9:11 ` [PATCH 1/3 " GUO Zihua
2022-11-17  9:11 ` [PATCH 2/3 v2] 9p: Remove redundent checks for message size against msize GUO Zihua
2022-11-17  9:11 ` [PATCH 3/3 v2] 9p: Use P9_HDRSZ for header size GUO Zihua
2022-11-17 10:49 ` [PATCH 0/3 v2] 9p: Fix write overflow in p9_read_work asmadeus
2022-11-17 10:54   ` Guozihua (Scott)
2022-11-17 13:33 ` Christian Schoenebeck
2022-11-18  4:59   ` asmadeus
2022-11-18 10:18     ` Guozihua (Scott)
2022-11-18 13:57       ` asmadeus
2022-11-18 15:34         ` Christian Schoenebeck

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.