Skip to main content

CVE-2024-53227: Vulnerability in Linux Linux

High
VulnerabilityCVE-2024-53227cvecve-2024-53227
Published: Fri Dec 27 2024 (12/27/2024, 13:50:16 UTC)
Source: CVE
Vendor/Project: Linux
Product: Linux

Description

In the Linux kernel, the following vulnerability has been resolved: scsi: bfa: Fix use-after-free in bfad_im_module_exit() BUG: KASAN: slab-use-after-free in __lock_acquire+0x2aca/0x3a20 Read of size 8 at addr ffff8881082d80c8 by task modprobe/25303 Call Trace: <TASK> dump_stack_lvl+0x95/0xe0 print_report+0xcb/0x620 kasan_report+0xbd/0xf0 __lock_acquire+0x2aca/0x3a20 lock_acquire+0x19b/0x520 _raw_spin_lock+0x2b/0x40 attribute_container_unregister+0x30/0x160 fc_release_transport+0x19/0x90 [scsi_transport_fc] bfad_im_module_exit+0x23/0x60 [bfa] bfad_init+0xdb/0xff0 [bfa] do_one_initcall+0xdc/0x550 do_init_module+0x22d/0x6b0 load_module+0x4e96/0x5ff0 init_module_from_file+0xcd/0x130 idempotent_init_module+0x330/0x620 __x64_sys_finit_module+0xb3/0x110 do_syscall_64+0xc1/0x1d0 entry_SYSCALL_64_after_hwframe+0x77/0x7f </TASK> Allocated by task 25303: kasan_save_stack+0x24/0x50 kasan_save_track+0x14/0x30 __kasan_kmalloc+0x7f/0x90 fc_attach_transport+0x4f/0x4740 [scsi_transport_fc] bfad_im_module_init+0x17/0x80 [bfa] bfad_init+0x23/0xff0 [bfa] do_one_initcall+0xdc/0x550 do_init_module+0x22d/0x6b0 load_module+0x4e96/0x5ff0 init_module_from_file+0xcd/0x130 idempotent_init_module+0x330/0x620 __x64_sys_finit_module+0xb3/0x110 do_syscall_64+0xc1/0x1d0 entry_SYSCALL_64_after_hwframe+0x77/0x7f Freed by task 25303: kasan_save_stack+0x24/0x50 kasan_save_track+0x14/0x30 kasan_save_free_info+0x3b/0x60 __kasan_slab_free+0x38/0x50 kfree+0x212/0x480 bfad_im_module_init+0x7e/0x80 [bfa] bfad_init+0x23/0xff0 [bfa] do_one_initcall+0xdc/0x550 do_init_module+0x22d/0x6b0 load_module+0x4e96/0x5ff0 init_module_from_file+0xcd/0x130 idempotent_init_module+0x330/0x620 __x64_sys_finit_module+0xb3/0x110 do_syscall_64+0xc1/0x1d0 entry_SYSCALL_64_after_hwframe+0x77/0x7f Above issue happens as follows: bfad_init error = bfad_im_module_init() fc_release_transport(bfad_im_scsi_transport_template); if (error) goto ext; ext: bfad_im_module_exit(); fc_release_transport(bfad_im_scsi_transport_template); --> Trigger double release Don't call bfad_im_module_exit() if bfad_im_module_init() failed.

AI-Powered Analysis

AILast updated: 07/02/2025, 23:10:19 UTC

Technical Analysis

CVE-2024-53227 is a high-severity use-after-free vulnerability in the Linux kernel's SCSI subsystem, specifically within the Broadcom Fibre Channel driver module (bfa). The flaw arises in the bfad_im_module_exit() function, which is called during module cleanup. The vulnerability is triggered when bfad_im_module_init() fails but bfad_im_module_exit() is still called, leading to a double release of the fc_release_transport() resource. This results in a use-after-free condition detected by Kernel Address Sanitizer (KASAN), where the kernel attempts to access memory that has already been freed. The vulnerability is rooted in improper error handling and resource management during module initialization and exit sequences. The kernel call stack traces indicate that the issue occurs during module loading and unloading operations, involving functions such as load_module(), init_module_from_file(), and __x64_sys_finit_module(). The affected code path involves locking mechanisms and transport template unregistering, which can lead to memory corruption. Exploitation of this vulnerability could allow a local attacker with limited privileges (PR:L) to escalate privileges or cause a denial of service by crashing the kernel, as the vulnerability impacts confidentiality, integrity, and availability. The CVSS 3.1 base score is 7.8, reflecting high severity with local attack vector, low attack complexity, requiring privileges but no user interaction, and impacting all three security properties. No known exploits are reported in the wild yet. The vulnerability affects specific Linux kernel versions identified by commit hashes, indicating it is present in recent kernel builds prior to the patch. The root cause is a CWE-416 (Use After Free) error, a common and dangerous memory corruption issue in kernel code.

Potential Impact

For European organizations, this vulnerability poses significant risks, especially for enterprises and service providers relying on Linux servers with Fibre Channel storage or SAN infrastructure using the affected Broadcom bfa driver. Exploitation could lead to kernel crashes, resulting in denial of service and potential data loss or corruption. More critically, attackers with local access could leverage this flaw to escalate privileges, potentially gaining root access and compromising sensitive data or critical infrastructure. This is particularly concerning for sectors such as finance, healthcare, telecommunications, and government agencies in Europe, where Linux-based systems are prevalent. The vulnerability could disrupt business continuity, lead to regulatory non-compliance (e.g., GDPR), and cause reputational damage. Since the attack requires local privileges, the threat is heightened in multi-tenant environments, cloud platforms, and shared hosting services common in Europe. The lack of known exploits currently provides a window for mitigation, but the high severity score and kernel-level impact necessitate urgent attention.

Mitigation Recommendations

European organizations should prioritize updating their Linux kernels to versions where this vulnerability is patched. Since the issue stems from improper error handling in the bfad driver, applying the official kernel patches or upgrading to the latest stable kernel release is the most effective mitigation. Organizations using custom or embedded Linux distributions should verify the presence of this fix in their kernel builds. Additionally, restricting local access to trusted users and employing strict access controls can reduce exploitation risk. Implementing kernel hardening techniques such as KASLR, SELinux/AppArmor policies, and enabling kernel lockdown modes can further mitigate privilege escalation attempts. Monitoring kernel logs for unusual module load/unload activities and crashes related to the bfa driver can help detect exploitation attempts. For environments where immediate patching is not feasible, disabling the affected bfa driver module or Fibre Channel support temporarily may be considered, though this could impact storage connectivity. Regular vulnerability scanning and integration of Linux kernel vulnerability feeds into security operations will aid in timely detection and response.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
Linux
Date Reserved
2024-11-19T17:17:25.025Z
Cisa Enriched
true
Cvss Version
3.1
State
PUBLISHED

Threat ID: 682d9823c4522896dcbdf006

Added to database: 5/21/2025, 9:08:51 AM

Last enriched: 7/2/2025, 11:10:19 PM

Last updated: 7/28/2025, 2:18:41 AM

Views: 10

Actions

PRO

Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.

Please log in to the Console to use AI analysis features.

Need enhanced features?

Contact root@offseq.com for Pro access with improved analysis and higher rate limits.

Latest Threats