linux-stable/net/9p
Hangyu Hua 1e2db0124c 9p/net: fix possible memory leak in p9_check_errors()
commit ce07087964 upstream.

When p9pdu_readf() is called with "s?d" attribute, it allocates a pointer
that will store a string. But when p9pdu_readf() fails while handling "d"
then this pointer will not be freed in p9_check_errors().

Fixes: 51a87c552d ("9p: rework client code to use new protocol support functions")
Reviewed-by: Christian Schoenebeck <linux_oss@crudebyte.com>
Signed-off-by: Hangyu Hua <hbh25y@gmail.com>
Message-ID: <20231027030302.11927-1-hbh25y@gmail.com>
Signed-off-by: Dominique Martinet <asmadeus@codewreck.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Link: https://bugzilla.kernel.org/show_bug.cgi?id=218235
Signed-off-by: Alexey Panov <apanov@astralinux.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-01-05 15:12:29 +01:00
..
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Makefile
client.c 9p/net: fix possible memory leak in p9_check_errors() 2024-01-05 15:12:29 +01:00
error.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 188 2019-05-30 11:29:21 -07:00
mod.c net: Add MODULE_DESCRIPTION entries to network modules 2020-06-20 21:33:57 -07:00
protocol.c net: 9p: avoid freeing uninit memory in p9pdu_vreadf 2024-01-05 15:12:28 +01:00
protocol.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 188 2019-05-30 11:29:21 -07:00
trans_common.c
trans_common.h
trans_fd.c 9p/trans_fd: Annotate data-racy writes to file::f_flags 2023-11-28 16:54:52 +00:00
trans_rdma.c 9p/rdma: unmap receive dma buffer in rdma_request()/post_recv() 2023-03-11 16:40:13 +01:00
trans_virtio.c 9p: virtio: make sure 'offs' is initialized in zc_request 2023-09-19 12:20:04 +02:00
trans_xen.c 9p/xen : Fix use after free bug in xen_9pfs_front_remove due to race condition 2023-04-20 12:10:25 +02:00