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

Goal: 1000 CNY · Raised: 1359 CNY

100%

CVE-2021-47139— net: hns3: put off calling register_netdev() until client initialize complete

Quick assessment

Affected
Linux Linux
Exploitation
No confirmed in-the-wild exploitation; assess based on exposure
Recommended action
Check the vendor advisory and references for a fixed version. If immediate upgrade is impossible, restrict exposure and increase monitoring.

Linux kernel是美国Linux基金会的开源操作系统Linux所使用的内核。 Linux kernel存在安全漏洞,该漏洞源于存在可用的时间窗口。

AI Predicted 5.5 Difficulty: Moderate EPSS 0.22% · P12

Affected Version Matrix 8

VendorProduct Version RangeStatus
Linux Linux 08a100689d4baf296d6898c687ea8d005da8d234< a663c1e418a3b5b8e8edfad4bc8e7278c312d6fc affected
08a100689d4baf296d6898c687ea8d005da8d234< 0921a0620b5077796fddffb22a8e6bc635a4bb50 affected
08a100689d4baf296d6898c687ea8d005da8d234< a289a7e5c1d49b7d47df9913c1cc81fb48fab613 affected
5.6 affected
< 5.6 unaffected
5.10.42≤ 5.10.* unaffected
5.12.9≤ 5.12.* unaffected
5.13≤ * unaffected
Get alerts for future matching vulnerabilities Log in to subscribe

I. Basic Information for CVE-2021-47139

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: hns3: put off calling register_netdev() until client initialize complete
Source: CVE Program / CVE List V5
Vulnerability Description
In the Linux kernel, the following vulnerability has been resolved: net: hns3: put off calling register_netdev() until client initialize complete Currently, the netdevice is registered before client initializing complete. So there is a timewindow between netdevice available and usable. In this case, if user try to change the channel number or ring param, it may cause the hns3_set_rx_cpu_rmap() being called twice, and report bug. [47199.416502] hns3 0000:35:00.0 eth1: set channels: tqp_num=1, rxfh=0 [47199.430340] hns3 0000:35:00.0 eth1: already uninitialized [47199.438554] hns3 0000:35:00.0: rss changes from 4 to 1 [47199.511854] hns3 0000:35:00.0: Channels changed, rss_size from 4 to 1, tqps from 4 to 1 [47200.163524] ------------[ cut here ]------------ [47200.171674] kernel BUG at lib/cpu_rmap.c:142! [47200.177847] Internal error: Oops - BUG: 0 [#1] PREEMPT SMP [47200.185259] Modules linked in: hclge(+) hns3(-) hns3_cae(O) hns_roce_hw_v2 hnae3 vfio_iommu_type1 vfio_pci vfio_virqfd vfio pv680_mii(O) [last unloaded: hclge] [47200.205912] CPU: 1 PID: 8260 Comm: ethtool Tainted: G O 5.11.0-rc3+ #1 [47200.215601] Hardware name: , xxxxxx 02/04/2021 [47200.223052] pstate: 60400009 (nZCv daif +PAN -UAO -TCO BTYPE=--) [47200.230188] pc : cpu_rmap_add+0x38/0x40 [47200.237472] lr : irq_cpu_rmap_add+0x84/0x140 [47200.243291] sp : ffff800010e93a30 [47200.247295] x29: ffff800010e93a30 x28: ffff082100584880 [47200.254155] x27: 0000000000000000 x26: 0000000000000000 [47200.260712] x25: 0000000000000000 x24: 0000000000000004 [47200.267241] x23: ffff08209ba03000 x22: ffff08209ba038c0 [47200.273789] x21: 000000000000003f x20: ffff0820e2bc1680 [47200.280400] x19: ffff0820c970ec80 x18: 00000000000000c0 [47200.286944] x17: 0000000000000000 x16: ffffb43debe4a0d0 [47200.293456] x15: fffffc2082990600 x14: dead000000000122 [47200.300059] x13: ffffffffffffffff x12: 000000000000003e [47200.306606] x11: ffff0820815b8080 x10: ffff53e411988000 [47200.313171] x9 : 0000000000000000 x8 : ffff0820e2bc1700 [47200.319682] x7 : 0000000000000000 x6 : 000000000000003f [47200.326170] x5 : 0000000000000040 x4 : ffff800010e93a20 [47200.332656] x3 : 0000000000000004 x2 : ffff0820c970ec80 [47200.339168] x1 : ffff0820e2bc1680 x0 : 0000000000000004 [47200.346058] Call trace: [47200.349324] cpu_rmap_add+0x38/0x40 [47200.354300] hns3_set_rx_cpu_rmap+0x6c/0xe0 [hns3] [47200.362294] hns3_reset_notify_init_enet+0x1cc/0x340 [hns3] [47200.370049] hns3_change_channels+0x40/0xb0 [hns3] [47200.376770] hns3_set_channels+0x12c/0x2a0 [hns3] [47200.383353] ethtool_set_channels+0x140/0x250 [47200.389772] dev_ethtool+0x714/0x23d0 [47200.394440] dev_ioctl+0x4cc/0x640 [47200.399277] sock_do_ioctl+0x100/0x2a0 [47200.404574] sock_ioctl+0x28c/0x470 [47200.409079] __arm64_sys_ioctl+0xb4/0x100 [47200.415217] el0_svc_common.constprop.0+0x84/0x210 [47200.422088] do_el0_svc+0x28/0x34 [47200.426387] el0_svc+0x28/0x70 [47200.431308] el0_sync_handler+0x1a4/0x1b0 [47200.436477] el0_sync+0x174/0x180 [47200.441562] Code: 11000405 79000c45 f8247861 d65f03c0 (d4210000) [47200.448869] ---[ end trace a01efe4ce42e5f34 ]--- The process is like below: excuting hns3_client_init | register_netdev() | hns3_set_channels() | | hns3_set_rx_cpu_rmap() hns3_reset_notify_uninit_enet() | | | quit without calling function | hns3_free_rx_cpu_rmap for flag | HNS3_NIC_STATE_INITED is unset. | | | hns3_reset_notify_init_enet() | | set HNS3_NIC_STATE_INITED call hns3_set_rx_cpu_rmap()-- crash Fix it by calling register_netdev() at the end of function hns3_client_init().
Source: CVE Program / CVE List V5
CVSS Information
N/A
Source: CVE Program / CVE List V5
Vulnerability Type
N/A
Source: CVE Program / CVE List V5
Vulnerability Title
Linux kernel 安全漏洞
Source: CNNVD (China National Vulnerability Database)
Vulnerability Description
Linux kernel是美国Linux基金会的开源操作系统Linux所使用的内核。 Linux kernel存在安全漏洞,该漏洞源于存在可用的时间窗口。
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

Vendor Product Affected Versions CPE Subscribe
Linux Linux 08a100689d4baf296d6898c687ea8d005da8d234 ~ a663c1e418a3b5b8e8edfad4bc8e7278c312d6fc -
Linux Linux 5.6 -

II. Public POCs for CVE-2021-47139

# POC Description Source Link Shenlong Link
AI-Generated POC Premium

No public POC found.

Login to generate AI POC

III. Intelligence Information for CVE-2021-47139

请登录查看更多情报信息。

Other References for CVE-2021-47139 (3)

Same Patch Batch · Linux · 2024-03-25 · 40 CVEs total

CVE-2021-47137 9.8 CRITICAL net: lantiq: fix memory corruption in RX ring
CVE-2021-47162 9.8 CRITICAL tipc: skb_linearize the head skb when reassembling msgs
CVE-2021-47168 9.8 CRITICAL NFS: fix an incorrect limit in filelayout_decode_layout()
CVE-2021-47136 8.6 HIGH net: zero-initialize tc skb extension on allocation
CVE-2021-47160 8.1 HIGH net: dsa: mt7530: fix VLAN traffic leaks
CVE-2021-47142 7.8 HIGH drm/amdgpu: Fix a use-after-free
CVE-2021-47175 7.8 HIGH net/sched: fq_pie: fix OOB access in the traffic path
CVE-2021-47148 7.8 HIGH octeontx2-pf: fix a buffer overflow in otx2_set_rxfh_context()
CVE-2021-47163 7.8 HIGH tipc: wait and exit until all work queues are done
CVE-2021-47152 7.8 HIGH mptcp: fix data stream corruption
CVE-2021-47153 7.8 HIGH i2c: i801: Don't generate an interrupt on bus reset
CVE-2021-47158 7.8 HIGH net: dsa: sja1105: add error handling in sja1105_setup()
CVE-2021-47159 7.8 HIGH net: dsa: fix a crash if ->get_sset_count() fails
CVE-2021-47178 7.5 HIGH scsi: target: core: Avoid smp_processor_id() in preemptible code
CVE-2021-47179 7.5 HIGH NFSv4: Fix a NULL pointer dereference in pnfs_mark_matching_lsegs_return()
CVE-2021-47180 NFC: nci: fix memory leak in nci_allocate_device
CVE-2021-47169 serial: rp2: use 'request_firmware' instead of 'request_firmware_nowait'
CVE-2021-47170 USB: usbfs: Don't WARN about excessively large memory allocations
CVE-2021-47167 NFS: Fix an Oopsable condition in __nfs_pageio_add_request()
CVE-2021-47171 net: usb: fix memory leak in smsc75xx_bind

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

IV. Related Vulnerabilities

V. Comments for CVE-2021-47139

No comments yet


Leave a comment