Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1688363
| From | Ben Hutchings <ben@decadent.org.uk> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 3.16 154/178] p9_client_readdir() fix |
| Date | 2017-07-16 16:40 +0200 |
| Message-ID | <u3SSh-fg-53@gated-at.bofh.it> (permalink) |
| References | <u3Sfv-89R-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
3.16.46-rc1 review patch. If anyone has any objections, please let me know.
------------------
From: Al Viro <viro@zeniv.linux.org.uk>
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: Ben Hutchings <ben@decadent.org.uk>
---
net/9p/client.c | 4 ++++
1 file changed, 4 insertions(+)
--- a/net/9p/client.c
+++ b/net/9p/client.c
@@ -2107,6 +2107,10 @@ int p9_client_readdir(struct p9_fid *fid
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);
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
[PATCH 3.16 154/178] p9_client_readdir() fix Ben Hutchings <ben@decadent.org.uk> - 2017-07-16 16:40 +0200
csiph-web