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] [thread-next>] [day] [month] [year] [list]
Message-ID: <c16370e5-2b65-4288-9f99-50e8faa9c8ea@bootlin.com>
Date: Fri, 30 Aug 2024 09:43:23 +0200
From: Alexis Lothoré <alexis.lothore@...tlin.com>
To: Jiawei Ye <jiawei.ye@...mail.com>, ajay.kathat@...rochip.com,
 claudiu.beznea@...on.dev, kvalo@...nel.org
Cc: linux-wireless@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] wifi: wilc1000: fix potential RCU dereference issue in
 wilc_parse_join_bss_param

Hello,

On 8/29/24 10:17, Jiawei Ye wrote:
> In the `wilc_parse_join_bss_param` function, the TSF field of the `ies`
> structure is accessed after the RCU read-side critical section is
> unlocked. According to RCU usage rules, this is illegal. Reusing this
> pointer can lead to unpredictable behavior, including accessing memory
> that has been updated or causing use-after-free issues.
> 
> This possible bug was identified using a static analysis tool developed
> by myself, specifically designed to detect RCU-related issues.
> 
> To address this, the TSF value is now stored in a local variable
> `ies_tsf` before the RCU lock is released. The `param->tsf_lo` field is
> then assigned using this local variable, ensuring that the TSF value is
> safely accessed.
> 
> Fixes: 205c50306acf ("wifi: wilc1000: fix RCU usage in connect path")
> Signed-off-by: Jiawei Ye <jiawei.ye@...mail.com>

I guess you are right, that indeed looks like a miss from 205c50306acf. And I
guess it needs wilc to receive packets with P2P info in it to trigger a RCU splat.

Reviewed-by: Alexis Lothoré <alexis.lothore@...tlin.com>

-- 
Alexis Lothoré, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ