CyberSecBulletin
CVE-2023-53148NVD status: Analyzed

Linux: Double Free

CVE-2023-53148 is a high-severity double free vulnerability in Linux, with a CVSS 3.1 base score of 7.8 out of 10. It can be exploited with local access to the system by an attacker with a low-privileged account, without any action from a user. The record lists versions c2312e1d12b1c3ee4100c173131b102e2aed4d04, 124e39a734cb90658b8f0dc110847bbfc6e33792, c9f56f3c7bc908caa772112d3ae71cdd5d18c257 as the first without the flaw, so updating Linux to one of those releases or later removes the exposure. There is no confirmed exploitation so far. EPSS estimates a 0.17% chance of exploitation within 30 days, which is low compared with other CVEs.

Next patch cycle

High severity with no evidence of exploitation so far.

What to do

  1. Update Linux to c2312e1d12b1c3ee4100c173131b102e2aed4d04 or 124e39a734cb90658b8f0dc110847bbfc6e33792 or c9f56f3c7bc908caa772112d3ae71cdd5d18c257 or 994c2ceb70ea99264ccc6f09e6703ca267dad63c, whichever matches your release line, or a later version.
  2. Update Linux Kernel to 4.14.322 or 4.19.291 or 5.4.251 or 5.10.188, whichever matches your release line, or a later version.

Affected products and versions

VendorProductAffected versionsFixed in
LinuxLinux9d5c824399dea881779d78a6c147288bf2dccb6b up to, but not including, c2312e1d12b1c3ee4100c173131b102e2aed4d04; 9d5c824399dea881779d78a6c147288bf2dccb6b up to, but not including, 124e39a734cb90658b8f0dc110847bbfc6e33792; 9d5c824399dea881779d78a6c147288bf2dccb6b up to, but not including, c9f56f3c7bc908caa772112d3ae71cdd5d18c257; 9d5c824399dea881779d78a6c147288bf2dccb6b up to, but not including, 994c2ceb70ea99264ccc6f09e6703ca267dad63c; 9d5c824399dea881779d78a6c147288bf2dccb6b up to, but not including, fa92c463eba75dcedbd8d689ffdcb83293aaa0c3; 9d5c824399dea881779d78a6c147288bf2dccb6b up to, but not including, 39695e87d86f0e7d897fba1d2559f825aa20caeb; 9d5c824399dea881779d78a6c147288bf2dccb6b up to, but not including, 41f63b72a01c0e0ac59ab83fd2d921fcce0f602d; 9d5c824399dea881779d78a6c147288bf2dccb6b up to, but not including, 004d25060c78fc31f66da0fa439c544dda1ac9d5; and 1 more rangesc2312e1d12b1c3ee4100c173131b102e2aed4d04, 124e39a734cb90658b8f0dc110847bbfc6e33792, c9f56f3c7bc908caa772112d3ae71cdd5d18c257, 994c2ceb70ea99264ccc6f09e6703ca267dad63c, fa92c463eba75dcedbd8d689ffdcb83293aaa0c3, 39695e87d86f0e7d897fba1d2559f825aa20caeb
LinuxLinux Kernelbefore 4.14.322; 4.15 up to, but not including, 4.19.291; 4.20 up to, but not including, 5.4.251; 5.5 up to, but not including, 5.10.188; 5.11 up to, but not including, 5.15.150; 5.16 up to, but not including, 6.1.42; 6.2 up to, but not including, 6.4.74.14.322, 4.19.291, 5.4.251, 5.10.188, 5.15.150, 6.1.42

Version data comes from the organisation that assigned the CVE. Confirm against the vendor advisory before deciding you are unaffected.

How the severity score breaks down

Attack vector
LocalThe attacker needs local access or must trick a user into running something.
Attack complexity
LowNo special conditions are needed; the attack works reliably.
Privileges required
LowA basic user account is enough.
User interaction
NoneNo action by a victim is required.
Scope
UnchangedImpact stays within the vulnerable component.
Confidentiality
HighAll data handled by the component can be read.
Integrity
HighData or code can be modified at will.
Availability
HighThe component can be taken down completely.

Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H. Scored by NVD.

Official description

In the Linux kernel, the following vulnerability has been resolved: igb: Fix igb_down hung on surprise removal In a setup where a Thunderbolt hub connects to Ethernet and a display through USB Type-C, users may experience a hung task timeout when they remove the cable between the PC and the Thunderbolt hub. This is because the igb_down function is called multiple times when the Thunderbolt hub is unplugged. For example, the igb_io_error_detected triggers the first call, and the igb_remove triggers the second call. The second call to igb_down will block at napi_synchronize. Here's the call trace: __schedule+0x3b0/0xddb ? __mod_timer+0x164/0x5d3 schedule+0x44/0xa8 schedule_timeout+0xb2/0x2a4 ? run_local_timers+0x4e/0x4e msleep+0x31/0x38 igb_down+0x12c/0x22a [igb 6615058754948bfde0bf01429257eb59f13030d4] __igb_close+0x6f/0x9c [igb 6615058754948bfde0bf01429257eb59f13030d4] igb_close+0x23/0x2b [igb 6615058754948bfde0bf01429257eb59f13030d4] __dev_close_many+0x95/0xec dev_close_many+0x6e/0x103 unregister_netdevice_many+0x105/0x5b1 unregister_netdevice_queue+0xc2/0x10d unregister_netdev+0x1c/0x23 igb_remove+0xa7/0x11c [igb 6615058754948bfde0bf01429257eb59f13030d4] pci_device_remove+0x3f/0x9c device_release_driver_internal+0xfe/0x1b4 pci_stop_bus_device+0x5b/0x7f pci_stop_bus_device+0x30/0x7f pci_stop_bus_device+0x30/0x7f pci_stop_and_remove_bus_device+0x12/0x19 pciehp_unconfigure_device+0x76/0xe9 pciehp_disable_slot+0x6e/0x131 pciehp_handle_presence_or_link_change+0x7a/0x3f7 pciehp_ist+0xbe/0x194 irq_thread_fn+0x22/0x4d ? irq_thread+0x1fd/0x1fd irq_thread+0x17b/0x1fd ? irq_forced_thread_fn+0x5f/0x5f kthread+0x142/0x153 ? __irq_get_irqchip_state+0x46/0x46 ? kthread_associate_blkcg+0x71/0x71 ret_from_fork+0x1f/0x30 In this case, igb_io_error_detected detaches the network interface and requests a PCIE slot reset, however, the PCIE reset callback is not being invoked and thus the Ethernet connection breaks down. As the PCIE error in this case is a non-fatal one, requesting a slot reset can be avoided. This patch fixes the task hung issue and preserves Ethernet connection by ignoring non-fatal PCIE errors.

Source: the CVE record as published by its numbering authority, via NVD and CVE.org.

The underlying weakness: Double Free

The product calls free() twice on the same memory address.

How developers prevent this class of flaw

  • Choose a language that provides automatic memory management.
  • Ensure that each allocation is freed only once. After freeing a chunk, set the pointer to NULL to ensure the pointer cannot be freed again. In complicated error conditions, be sure that clean-up routines respect the state of allocation properly. If the language is object oriented, ensure that object destructors delete each chunk of memory only once.
  • Use a static analysis tool to find double free instances.

More Double Free vulnerabilities (CWE-415)

Timeline

  1. CVE record published.
  2. Record last changed materially (score, affected products, status or references).

References

Recent Double Free vulnerabilities

Spotted an error? Tell us.