android_kernel_motorola_sm6225/net/9p
Dominique Martinet 6490cdf9d2 9p: p9dirent_read: check network-provided name length
[ Upstream commit ef5305f1f72eb1cfcda25c382bb0368509c0385b ]

strcpy to dirent->d_name could overflow the buffer, use strscpy to check
the provided string length and error out if the size was too big.

While we are here, make the function return an error when the pdu
parsing failed, instead of returning the pdu offset as if it had been a
success...

Link: http://lkml.kernel.org/r/1536339057-21974-4-git-send-email-asmadeus@codewreck.org
Addresses-Coverity-ID: 139133 ("Copy into fixed size buffer")
Signed-off-by: Dominique Martinet <dominique.martinet@cea.fr>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-07-03 13:14:42 +02:00
..
client.c 9p: Add refcount to p9_req_t 2019-07-03 13:14:42 +02:00
error.c hlist: drop the node parameter from iterators 2013-02-27 19:10:24 -08:00
Kconfig IB: Revert "remove redundant INFINIBAND kconfig dependencies" 2018-05-28 10:40:16 -06:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mod.c 9p: Use a slab for allocating requests 2019-07-03 13:14:41 +02:00
protocol.c 9p: p9dirent_read: check network-provided name length 2019-07-03 13:14:42 +02:00
protocol.h
trans_common.c net/9p: correct some comment errors in 9p file system code 2018-05-10 08:21:53 -04:00
trans_common.h net/9p: remove (now-)unused helpers 2015-04-11 22:28:29 -04:00
trans_fd.c 9p: Rename req to rreq in trans_fd 2019-07-03 13:14:42 +02:00
trans_rdma.c 9p/rdma: remove useless check in cm_event_handler 2019-07-03 13:14:42 +02:00
trans_virtio.c 9p: Add refcount to p9_req_t 2019-07-03 13:14:42 +02:00
trans_xen.c 9p: Add refcount to p9_req_t 2019-07-03 13:14:42 +02:00
util.c 9p: fix whitespace issues 2018-08-13 09:34:58 +09:00