projects
/
GitHub
/
exynos8895
/
android_kernel_samsung_universal8895.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3bf0809
)
p9_client_readdir() fix
author
Al Viro
<viro@zeniv.linux.org.uk>
Fri, 14 Apr 2017 21:22:18 +0000
(17:22 -0400)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Wed, 3 May 2017 04:19:55 +0000
(21:19 -0700)
commit
71d6ad08379304128e4bdfaf0b4185d54375423e
upstream.
Don't assume that server is sane and won't return more data than
asked for.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/9p/client.c
patch
|
blob
|
blame
|
history
diff --git
a/net/9p/client.c
b/net/9p/client.c
index ea79ee9a73489f43a88e57c2eb529fc11d894e5f..f5feac4ff4ec5b086818be559d4c1776ee4e2621 100644
(file)
--- a/
net/9p/client.c
+++ b/
net/9p/client.c
@@
-2101,6
+2101,10
@@
int p9_client_readdir(struct p9_fid *fid, char *data, u32 count, u64 offset)
trace_9p_protocol_dump(clnt, req->rc);
goto free_and_error;
}
+ if (rsize < count) {
+ pr_err("bogus RREADDIR count (%d > %d)\n", count, rsize);
+ count = rsize;
+ }
p9_debug(P9_DEBUG_9P, "<<< RREADDIR count %d\n", count);