Messages in this thread Patch in this message | | | From | Nikita Zhandarovich <> | Subject | Re: [syzbot] [v9fs?] KMSAN: uninit-value in p9_client_rpc (2) | Date | Wed, 3 Apr 2024 06:33:01 -0700 |
| |
If p9_check_errors() fails in p9_client_rpc(), req->rc.tag won't be initialized and trace_9p_client_res() will try to print it before exiting with error, triggering KMSAN. Fix it by having id and tag fields inited with zero values.
Please test.
#syz test https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
net/9p/client.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/net/9p/client.c b/net/9p/client.c index e265a0ca6bdd..a9d613af7455 100644 --- a/net/9p/client.c +++ b/net/9p/client.c @@ -235,6 +235,8 @@ static int p9_fcall_init(struct p9_client *c, struct p9_fcall *fc, if (!fc->sdata) return -ENOMEM; fc->capacity = alloc_msize; + fc->id = 0; + fc->tag = 0; return 0; }
| |