public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Anirudh Rayabharam <mail@anirudhrb.com>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: Kalle Valo <kvalo@codeaurora.org>,
	"David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	gregkh@linuxfoundation.org,
	linux-kernel-mentees@lists.linuxfoundation.org,
	syzbot+b2645b5bf1512b81fa22@syzkaller.appspotmail.com,
	linux-wireless@vger.kernel.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, mail@anirudhrb.com
Subject: Re: [PATCH] mac80211_hwsim: correctly handle zero length frames
Date: Wed, 23 Jun 2021 12:56:20 +0530	[thread overview]
Message-ID: <YNLiHJuD3GuDgbKR@anirudhrb.com> (raw)
In-Reply-To: <a3589e399e179b389e90df36acb67ae1ec7dea97.camel@sipsolutions.net>

On Fri, Jun 18, 2021 at 11:36:16AM +0200, Johannes Berg wrote:
> On Thu, 2021-06-10 at 21:49 +0530, Anirudh Rayabharam wrote:
> > syzbot, using KMSAN, has reported an uninit-value access in
> > hwsim_cloned_frame_received_nl(). This is happening because frame_data_len
> > is 0. The code doesn't detect this case and blindly tries to read the
> > frame's header.
> > 
> > Fix this by bailing out in case frame_data_len is 0.
> 
> This really seems quite pointless - you should bail out if the frame is
> too short for what we need to do, not just when it's 0.

That makes sense. Do you happen to know what the min length of a valid
frame is? There doesn't seem to be constant defined for that already.

	- Anirudh

> 
> johannes
> 

      reply	other threads:[~2021-06-23  7:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-10 16:19 [PATCH] mac80211_hwsim: correctly handle zero length frames Anirudh Rayabharam
2021-06-18  9:36 ` Johannes Berg
2021-06-23  7:26   ` Anirudh Rayabharam [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=YNLiHJuD3GuDgbKR@anirudhrb.com \
    --to=mail@anirudhrb.com \
    --cc=davem@davemloft.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=johannes@sipsolutions.net \
    --cc=kuba@kernel.org \
    --cc=kvalo@codeaurora.org \
    --cc=linux-kernel-mentees@lists.linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=syzbot+b2645b5bf1512b81fa22@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