Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1000 CNY

100.0%

CVE-2022-48815— net: dsa: bcm_sf2: don't use devres for mdiobus

EPSS 0.03% · P10

Affected Version Matrix 10

VendorProductVersion RangeStatus
LinuxLinuxac3a68d56651c3dad2c12c7afce065fe15267f44< 2770b795294ed312375c11ef1d0b810499c66b83affected
ac3a68d56651c3dad2c12c7afce065fe15267f44< caabb5f64f5c32fceed93356bb688ef1ec6c5783affected
ac3a68d56651c3dad2c12c7afce065fe15267f44< 08e1a3554e99a1a5bd2835907381e2383ee85caeaffected
ac3a68d56651c3dad2c12c7afce065fe15267f44< 08f1a20822349004bb9cc1b153ecb516e9f2889daffected
5.9affected
< 5.9unaffected
5.10.101≤ 5.10.*unaffected
5.15.24≤ 5.15.*unaffected
… +2 more rows
Get alerts for future matching vulnerabilitiesLog in to subscribe

I. Basic Information for CVE-2022-48815

Vulnerability Information

Have questions about the vulnerability? See if Shenlong's analysis helps!
View Shenlong Deep Dive ↗

Although we use advanced large model technology, its output may still contain inaccurate or outdated information.Shenlong tries to ensure data accuracy, but please verify and judge based on the actual situation.

Vulnerability Title
net: dsa: bcm_sf2: don't use devres for mdiobus
Source: NVD (National Vulnerability Database)
Vulnerability Description
In the Linux kernel, the following vulnerability has been resolved: net: dsa: bcm_sf2: don't use devres for mdiobus As explained in commits: 74b6d7d13307 ("net: dsa: realtek: register the MDIO bus under devres") 5135e96a3dd2 ("net: dsa: don't allocate the slave_mii_bus using devres") mdiobus_free() will panic when called from devm_mdiobus_free() <- devres_release_all() <- __device_release_driver(), and that mdiobus was not previously unregistered. The Starfighter 2 is a platform device, so the initial set of constraints that I thought would cause this (I2C or SPI buses which call ->remove on ->shutdown) do not apply. But there is one more which applies here. If the DSA master itself is on a bus that calls ->remove from ->shutdown (like dpaa2-eth, which is on the fsl-mc bus), there is a device link between the switch and the DSA master, and device_links_unbind_consumers() will unbind the bcm_sf2 switch driver on shutdown. So the same treatment must be applied to all DSA switch drivers, which is: either use devres for both the mdiobus allocation and registration, or don't use devres at all. The bcm_sf2 driver has the code structure in place for orderly mdiobus removal, so just replace devm_mdiobus_alloc() with the non-devres variant, and add manual free where necessary, to ensure that we don't let devres free a still-registered bus.
Source: NVD (National Vulnerability Database)
CVSS Information
N/A
Source: NVD (National Vulnerability Database)
Vulnerability Type
N/A
Source: NVD (National Vulnerability Database)
Vulnerability Title
Linux kernel 安全漏洞
Source: CNNVD (China National Vulnerability Database)
Vulnerability Description
Linux kernel是美国Linux基金会的开源操作系统Linux所使用的内核。 Linux kernel 存在安全漏洞,该漏洞源于net:dsa:bcm_sf2模块在使用devres分配mdiobus时,如果从devm_mdiobus_free函数调用mdiobus_free函数,并且mdiobus之前没有被注销,将会导致恐慌。
Source: CNNVD (China National Vulnerability Database)
CVSS Information
N/A
Source: CNNVD (China National Vulnerability Database)
Vulnerability Type
N/A
Source: CNNVD (China National Vulnerability Database)

Affected Products

VendorProductAffected VersionsCPESubscribe
LinuxLinux ac3a68d56651c3dad2c12c7afce065fe15267f44 ~ 2770b795294ed312375c11ef1d0b810499c66b83 -
LinuxLinux 5.9 -

II. Public POCs for CVE-2022-48815

#POC DescriptionSource LinkShenlong Link
AI-Generated POCPremium

No public POC found.

Login to generate AI POC

III. Intelligence Information for CVE-2022-48815

登录查看更多情报信息。

Same Patch Batch · Linux · 2024-07-16 · 98 CVEs total

CVE-2022-48832audit: don't deref the syscall args when checking the openat2 open_how::flags
CVE-2022-48826drm/vc4: Fix deadlock on DSI device attach error
CVE-2022-48822usb: f_fs: Fix use-after-free for epfile
CVE-2022-48821misc: fastrpc: avoid double fput() on failed usercopy
CVE-2022-48819tcp: take care of mixed splice()/sendmsg(MSG_ZEROCOPY) case
CVE-2022-48820phy: stm32: fix a refcount leak in stm32_usbphyc_pll_enable()
CVE-2022-48818net: dsa: mv88e6xxx: don't use devres for mdiobus
CVE-2022-48823scsi: qedf: Fix refcount issue when LOGO is received during TMF
CVE-2022-48830can: isotp: fix potential CAN frame reception race in isotp_rcv()
CVE-2022-48831ima: fix reference leak in asymmetric_verify()
CVE-2022-48828NFSD: Fix ia_size underflow
CVE-2022-48834usb: usbtmc: Fix bug in pipe direction for control transfers
CVE-2022-48833btrfs: skip reserved bytes warning on unmount after log cleanup failure
CVE-2022-48835scsi: mpt3sas: Page fault in reply q processing
CVE-2022-48837usb: gadget: rndis: prevent integer overflow in rndis_set_response()
CVE-2022-48836Input: aiptek - properly check endpoint type
CVE-2022-48838usb: gadget: Fix use-after-free bug by not setting udc->dev.driver
CVE-2022-48839net/packet: fix slab-out-of-bounds access in packet_recvmsg()
CVE-2022-48840iavf: Fix hang during reboot/shutdown
CVE-2022-48842ice: Fix race condition during interface enslave

Showing top 20 of 98 CVEs. View all on vendor page &rarr; →

IV. Related Vulnerabilities

V. Comments for CVE-2022-48815

No comments yet


Leave a comment