linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Michal Kubecek <mkubecek@suse.cz>
Cc: "David S. Miller" <davem@davemloft.net>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net] ethtool: fix stack overflow in ethnl_parse_bitset()
Date: Wed, 9 Dec 2020 15:55:40 -0800	[thread overview]
Message-ID: <20201209155540.7217ee8a@kicinski-fedora-pc1c0hjn.DHCP.thefacebook.com> (raw)
In-Reply-To: <3487ee3a98e14cd526f55b6caaa959d2dcbcad9f.1607465316.git.mkubecek@suse.cz>

On Tue,  8 Dec 2020 23:13:51 +0100 (CET) Michal Kubecek wrote:
> Syzbot reported a stack overflow in bitmap_from_arr32() called from
> ethnl_parse_bitset() when bitset from netlink message is longer than
> target bitmap length. While ethnl_compact_sanity_checks() makes sure that
> trailing part is all zeros (i.e. the request does not try to touch bits
> kernel does not recognize), we also need to cap change_bits to nbits so
> that we don't try to write past the prepared bitmaps.
> 
> Fixes: 88db6d1e4f62 ("ethtool: add ethnl_parse_bitset() helper")
> Reported-by: syzbot+9d39fa49d4df294aab93@syzkaller.appspotmail.com
> Signed-off-by: Michal Kubecek <mkubecek@suse.cz>

Applied, thank you!

      reply	other threads:[~2020-12-09 23:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-08 22:13 [PATCH net] ethtool: fix stack overflow in ethnl_parse_bitset() Michal Kubecek
2020-12-09 23:55 ` Jakub Kicinski [this message]

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=20201209155540.7217ee8a@kicinski-fedora-pc1c0hjn.DHCP.thefacebook.com \
    --to=kuba@kernel.org \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mkubecek@suse.cz \
    --cc=netdev@vger.kernel.org \
    /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).