Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1633919
| Path | csiph.com!goblin2!goblin.stu.neva.ru!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
| Newsgroups | linux.kernel |
| Subject | [PATCH 4.9 44/54] p9_client_readdir() fix |
| Date | Mon, 01 May 2017 23:40:04 +0200 |
| Message-ID | <tCrd2-5UI-87@gated-at.bofh.it> (permalink) |
| References | <tCrcZ-5UI-9@gated-at.bofh.it> |
| X-Mailer | git-send-email 2.12.2 |
| User-Agent | quilt/0.65 |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset=UTF-8 |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 31 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | Greg Kroah-Hartman <gregkh@linuxfoundation.org>, stable@vger.kernel.org, Al Viro <viro@zeniv.linux.org.uk> |
| X-Original-Date | Mon, 1 May 2017 14:31:51 -0700 |
| X-Original-Message-ID | <20170501212633.574705774@linuxfoundation.org> |
| X-Original-References | <20170501212631.798128131@linuxfoundation.org> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1633919 |
Show key headers only | View raw
4.9-stable 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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
net/9p/client.c | 4 ++++
1 file changed, 4 insertions(+)
--- a/net/9p/client.c
+++ b/net/9p/client.c
@@ -2101,6 +2101,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 4.9 44/54] p9_client_readdir() fix Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-05-01 23:40 +0200
csiph-web