9p: do not trust pdu content for stat item size
authorGertjan Halkes <gertjan@google.com>
Wed, 5 Sep 2018 06:41:29 +0000 (15:41 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 20 Apr 2019 07:15:04 +0000 (09:15 +0200)
commitfdf0c593ec3e7924952f195933f676e53b319302
tree6eac053123fd38155410b4370bdbbb3d06dc0a0c
parentad78e2e057ab8d914a2b5e3e6acf29c3c8a428a3
9p: do not trust pdu content for stat item size

[ Upstream commit 2803cf4379ed252894f046cb8812a48db35294e3 ]

v9fs_dir_readdir() could deadloop if a struct was sent with a size set
to -2

Link: http://lkml.kernel.org/r/1536134432-11997-1-git-send-email-asmadeus@codewreck.org
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=88021
Signed-off-by: Gertjan Halkes <gertjan@google.com>
Signed-off-by: Dominique Martinet <dominique.martinet@cea.fr>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/9p/vfs_dir.c
net/9p/protocol.c