From: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
To: Christoph Hellwig <hch@lst.de>
Cc: nhorman@tuxdriver.com, linux-sctp@vger.kernel.org,
netdev@vger.kernel.org,
syzbot+0e4699d000d8b874d8dc@syzkaller.appspotmail.com
Subject: Re: [PATCH v2 net-next] sctp: fix slab-out-of-bounds in SCTP_DELAYED_SACK processing
Date: Fri, 24 Jul 2020 09:52:06 -0300 [thread overview]
Message-ID: <20200724125206.GC3399@localhost.localdomain> (raw)
In-Reply-To: <20200724064855.132552-1-hch@lst.de>
On Fri, Jul 24, 2020 at 08:48:55AM +0200, Christoph Hellwig wrote:
> 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>
Thanks Christoph.
next prev parent reply other threads:[~2020-07-24 12:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-24 6:48 [PATCH v2 net-next] sctp: fix slab-out-of-bounds in SCTP_DELAYED_SACK processing Christoph Hellwig
2020-07-24 12:52 ` Marcelo Ricardo Leitner [this message]
2020-07-24 23:49 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200724125206.GC3399@localhost.localdomain \
--to=marcelo.leitner@gmail.com \
--cc=hch@lst.de \
--cc=linux-sctp@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=nhorman@tuxdriver.com \
--cc=syzbot+0e4699d000d8b874d8dc@syzkaller.appspotmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).