summaryrefslogtreecommitdiff
path: root/fs/9p
diff options
context:
space:
mode:
authorDominique Martinet <dominique.martinet@cea.fr>2018-09-08 00:36:08 +0900
committerDominique Martinet <dominique.martinet@cea.fr>2018-09-08 01:52:29 +0900
commitef5305f1f72eb1cfcda25c382bb0368509c0385b (patch)
treef03d8d9e65bd3c3cec20f5a2e889d859265f87b0 /fs/9p
parent473c7dd1d7b59ff8f88a5154737e3eac78a96e5b (diff)
9p: p9dirent_read: check network-provided name length
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>
Diffstat (limited to 'fs/9p')
0 files changed, 0 insertions, 0 deletions