diff options
author | Christoph Hellwig <hch@lst.de> | 2020-07-24 08:48:55 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-07-24 16:40:36 -0700 |
commit | dfd3d5266dc1d9a2b06e5a09bbff4cee547eeb5f (patch) | |
tree | 4f25eeb9ee33acce00d6f04f7dcdd95c64134d23 /samples/mei | |
parent | aab99b62b4d007346bff277c82cdc3e64f3e4121 (diff) | |
download | linux-dfd3d5266dc1d9a2b06e5a09bbff4cee547eeb5f.tar.gz linux-dfd3d5266dc1d9a2b06e5a09bbff4cee547eeb5f.tar.bz2 linux-dfd3d5266dc1d9a2b06e5a09bbff4cee547eeb5f.zip |
sctp: fix slab-out-of-bounds in SCTP_DELAYED_SACK processing
This sockopt accepts two kinds of parameters, using struct
sctp_sack_info and struct sctp_assoc_value. The mentioned commit didn't
notice an implicit cast from the smaller (latter) struct to the bigger
one (former) when copying the data from the user space, which now leads
to an attempt to write beyond the buffer (because it assumes the storing
buffer is bigger than the parameter itself).
Fix it by allocating a sctp_sack_info on stack and filling it out based
on the small struct for the compat case.
Changelog stole from an earlier patch from Marcelo Ricardo Leitner.
Fixes: ebb25defdc17 ("sctp: pass a kernel pointer to sctp_setsockopt_delayed_ack")
Reported-by: syzbot+0e4699d000d8b874d8dc@syzkaller.appspotmail.com
Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'samples/mei')
0 files changed, 0 insertions, 0 deletions