diff options
author | Dominique Martinet <dominique.martinet@cea.fr> | 2018-09-07 18:36:08 +0300 |
---|---|---|
committer | Dominique Martinet <dominique.martinet@cea.fr> | 2018-09-07 19:52:29 +0300 |
commit | ef5305f1f72eb1cfcda25c382bb0368509c0385b (patch) | |
tree | f03d8d9e65bd3c3cec20f5a2e889d859265f87b0 /fs | |
parent | 473c7dd1d7b59ff8f88a5154737e3eac78a96e5b (diff) | |
download | linux-ef5305f1f72eb1cfcda25c382bb0368509c0385b.tar.xz |
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')
0 files changed, 0 insertions, 0 deletions