All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Tianchu Chen <tianchu.chen@linux.dev>
Cc: hansg@kernel.org, linux-staging@lists.linux.dev,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: rtl8723bs: fix protected RX frame validation in decrypt path
Date: Mon, 7 Sep 2026 18:10:21 +0200	[thread overview]
Message-ID: <2026090706-uncapped-footbath-8692@gregkh> (raw)
In-Reply-To: <0f2ad51e4486aa048cefea748332f833fa7ec57d@linux.dev>

On Mon, Sep 07, 2026 at 04:00:11PM +0000, Tianchu Chen wrote:
> August 19, 2026 at 11:11 PM, "Tianchu Chen" <tianchu.chen@linux.dev mailto:tianchu.chen@linux.dev?to=%22Tianchu%20Chen%22%20%3Ctianchu.chen%40linux.dev%3E > wrote:
> 
> 
> > 
> > August 19, 2026 at 10:45 PM, "Greg KH" <gregkh@linuxfoundation.org mailto:gregkh@linuxfoundation.org?to=%22Greg%20KH%22%20%3Cgregkh%40linuxfoundation.org%3E > wrote:
> > 
> > > 
> > > On Wed, Aug 19, 2026 at 02:22:47PM +0000, Tianchu Chen wrote:
> > >  
> > >  
> > >  From: Tianchu Chen <flynnnchen@tencent.com>
> > >  
> > >  The RX software decrypt path mishandles crafted protected frames from a
> > >  malicious AP in two ways:
> > >  
> > >  1) decryptor() never checks that a protected frame is long enough to
> > >  hold the 802.11 header plus the per-cipher trailer(IV, ICV/MIC).
> > >  
> > >  Implementations like rtw_wep_decrypt() and rtw_aes_decrypt() all compute
> > >  length = hdr.len - hdrlen - iv_len. and a shorter frame underflows the 
> > >  unsigned subtraction, turning into OOB reads/writes.
> > >  
> > >  Reject such frames in decryptor() before touching the IV.
> > >  
> > >  2) validate_80211w_mgmt() uses the skb before checking whether
> > >  decryptor() returned NULL. On decrypt failure the skb has been freed
> > >  before being used.
> > >  
> > >  Bail out immediately when decryptor() fails.
> > >  
> > >  Discovered by Atuin - Automated Vulnerability Discovery Engine.
> > >  
> > >  Fixes: 554c0a3abf21 ("staging: Add rtl8723bs sdio wifi driver")
> > >  Cc: stable@vger.kernel.org
> > >  Signed-off-by: Tianchu Chen <flynnnchen@tencent.com>
> > >  
> > >  No assisted-by: line?
> > >  
> > >  And you have read this:
> > >  https://lore.kernel.org/all/2026080354-skater-urgent-31b2@gregkh
> > >  right?
> > > 
> > Thanks for pointing out, I have not read this before.
> > 
> > Assisted-by: kimi-code:kimi-k3
> > 
> > > 
> > > So did you test this on the real hardware?
> > > 
> > Unfortunately I have no real hardware.
> >
> 
> Hi Greg,
> 
> A while ago I had no access to real hardware with this chip, so I was not able
> to actually reproduce and verify the bug.
> 
> That has changed: I recently picked up a board with an RTL8723BS from the
> second-hand market. I can now confirm that the bug can be triggered by on-air
> Wi-Fi packets from a bogus AP.
> 
> The v2 patch with test report has been sent:
> 
> https://lore.kernel.org/linux-staging/7848fcb635963ddb8474924ed71fdd687b5d6ec7@linux.dev/

Great!

> Hopefully this time it is good enough to be merged into staging.

It's a bit wrong, will go comment on it now...


      reply	other threads:[~2026-09-07 16:12 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-19 14:22 [PATCH] staging: rtl8723bs: fix protected RX frame validation in decrypt path Tianchu Chen
2026-08-19 14:45 ` Greg KH
2026-08-19 15:11   ` Tianchu Chen
2026-09-07 16:00     ` Tianchu Chen
2026-09-07 16:10       ` Greg KH [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=2026090706-uncapped-footbath-8692@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=hansg@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=tianchu.chen@linux.dev \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.