lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <c0d187d6fead4e5387db2a14129be96c@realtek.com>
Date: Wed, 26 Nov 2025 03:26:36 +0000
From: Ping-Ke Shih <pkshih@...ltek.com>
To: Bitterblue Smith <rtl8821cerfe2@...il.com>,
        Zenm Chen
	<zenmchen@...il.com>,
        "gustavo@...eddedor.com" <gustavo@...eddedor.com>
CC: "Jes.Sorensen@...il.com" <Jes.Sorensen@...il.com>,
        "gustavoars@...nel.org"
	<gustavoars@...nel.org>,
        "linux-hardening@...r.kernel.org"
	<linux-hardening@...r.kernel.org>,
        "linux-kernel@...r.kernel.org"
	<linux-kernel@...r.kernel.org>,
        "linux-wireless@...r.kernel.org"
	<linux-wireless@...r.kernel.org>
Subject: RE: [PATCH][next] wifi: rtl8xxxu: Avoid
 -Wflex-array-member-not-at-end warnings

Hi Bitterblue,

Bitterblue Smith <rtl8821cerfe2@...il.com> wrote:
> On 21/11/2025 13:11, Zenm Chen wrote:
> > Gustavo A. R. Silva <gustavo@...eddedor.com> 於 2025年11月21日 週五 下午6:20寫道:
> >>
> >> Hi,
> >>
> >> On 11/21/25 19:06, Zenm Chen wrote:
> >>> Dear maintainers,
> >>>
> >>> With this patch applied, my system always freezes right after the rtl8xxxu
> >>> driver is loaded. is it normal?
> >>
> >> I don't think so... It probably means that struct urb urb; cannot really be
> >> moved to the end of struct rtl8xxxu_rx_urb or struct rtl8xxxu_tx_urb?
> >>
> >> It'd be great if you could share a log.
> >>
> >
> > Hi,
> >
> > Nothing helpful found from the kernel log. Maybe Realtek drivers maintainer
> > Ping-Ke could take a look what is wrong next Monday.
> >
> [...]
> 
> I got something. In my case everything seemed fine until I unplugged the
> wifi adapter. And then the system still worked for a few minutes before
> it froze.
> 

Zenm and I tested below changes which can also reproduce the symptom, so
I wonder driver might assume urb is the first member of struct, but 
unfortunately I can't find that. Could you also help to review if something
I missed? Thanks.


--- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h
+++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h
@@ -1942,15 +1942,19 @@ struct rtl8xxxu_vif {
 };

 struct rtl8xxxu_rx_urb {
+       u8 pad[128];
        struct urb urb;
        struct ieee80211_hw *hw;
        struct list_head list;
};

 struct rtl8xxxu_tx_urb {
+       u8 pad[128];
        struct urb urb;
        struct ieee80211_hw *hw;
        struct list_head list;
};

 struct rtl8xxxu_fileops {


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ