Bug 2256786 (CVE-2023-6270, ZDI-CAN-22236)

Summary: CVE-2023-6270 kernel: AoE: improper reference count leads to use-after-free vulnerability
Product: [Other] Security Response Reporter: Mauro Matteo Cascella <mcascell>
Component: vulnerabilityAssignee: Product Security <prodsec-ir-bot>
Status: NEW --- QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: acaringi, allarkin, bhu, carnil, chwhite, cye, cyin, dbohanno, debarbos, dfreiber, drow, dvlasenk, ezulian, hkrzesin, jarod, jburrell, jdenham, jfaracco, jforbes, jlelli, joe.lawrence, jshortt, jstancek, jwyatt, kcarcia, ldoskova, lgoncalv, lzampier, mmilgram, mstowell, nmurray, ptalbert, rparrazo, rrobaina, rvrbovsk, rysulliv, scweaver, tglozar, tyberry, vkumar, wcosta, williams, wmealing, ycote, ykopkova, zhijwang
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
A flaw was found in the ATA over Ethernet (AoE) driver in the Linux kernel. The aoecmd_cfg_pkts() function improperly updates the refcnt on `struct net_device`, and a use-after-free can be triggered by racing between the free on the struct and the access through the `skbtxq` global queue. This could lead to a denial of service condition or potential code execution.
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 2256787    
Bug Blocks: 2256791    

Description Mauro Matteo Cascella 2024-01-04 14:46:47 UTC
A flaw was found in the ATA over Ethernet (AoE) driver in the Linux kernel. The aoecmd_cfg_pkts() improperly updates the refcnt on `struct net_device`, and a use-after-free can be triggered by racing between the free on the struct and the access through the `skbtxq` global queue.

ZDI security advisory (possibly yet to be published):
https://www.zerodayinitiative.com/advisories/ZDI-CAN-22236/

Comment 1 Mauro Matteo Cascella 2024-01-04 14:47:34 UTC
Created kernel tracking bugs for this issue:

Affects: fedora-all [bug 2256787]

Comment 5 Salvatore Bonaccorso 2024-01-04 20:37:26 UTC
Is this handled upstream? Do you by chance have a reference to the upstream proposed fix?

To the best of my knowledge, there is no recent commit in drivers/block/aoe/ area upstream in mainline which might go in that direction.

Comment 6 Mauro Matteo Cascella 2024-01-05 08:01:04 UTC
In reply to comment #5:
> Is this handled upstream? Do you by chance have a reference to the upstream
> proposed fix?

We've got this from ZDI, the Linux kernel security team (security) should be aware of this bug too.

> To the best of my knowledge, there is no recent commit in drivers/block/aoe/
> area upstream in mainline which might go in that direction.

I couldn't find any relevant upstream discussion or commit either, hopefully ZDI will publish their advisory soon and we'll get more information there.