Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1553034
| From | Santosh Shilimkar <santosh.shilimkar@oracle.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [net-next][PATCH] RDS: validate the requested traces user input against max supported |
| Date | 2017-01-06 19:50 +0100 |
| Message-ID | <sWHKp-5So-15@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
Larger than supported value can lead to array read/write overflow.
Reported-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
---
net/rds/af_rds.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/net/rds/af_rds.c b/net/rds/af_rds.c
index fd821740..b405f77 100644
--- a/net/rds/af_rds.c
+++ b/net/rds/af_rds.c
@@ -310,6 +310,9 @@ static int rds_recv_track_latency(struct rds_sock *rs, char __user *optval,
if (copy_from_user(&trace, optval, sizeof(trace)))
return -EFAULT;
+ if (trace.rx_traces > RDS_MSG_RX_DGRAM_TRACE_MAX)
+ return -EFAULT;
+
rs->rs_rx_traces = trace.rx_traces;
for (i = 0; i < rs->rs_rx_traces; i++) {
if (trace.rx_trace_pos[i] > RDS_MSG_RX_DGRAM_TRACE_MAX) {
--
1.9.1
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[net-next][PATCH] RDS: validate the requested traces user input against max supported Santosh Shilimkar <santosh.shilimkar@oracle.com> - 2017-01-06 19:50 +0100 Re: [net-next][PATCH] RDS: validate the requested traces user input against max supported David Miller <davem@davemloft.net> - 2017-01-07 04:20 +0100
csiph-web