CVE-2024-53227: scsi: bfa: Fix use-after-free in bfad_im_module_exit()

Published Dec 27, 2024
·
Updated

In the Linux kernel, the following vulnerability has been resolved:

scsi: bfa: Fix use-after-free in bfadimmoduleexit()

BUG: KASAN: slab-use-after-free in lockacquire+0x2aca/0x3a20 Read of size 8 at addr ffff8881082d80c8 by task modprobe/25303

Call Trace: <TASK> dumpstacklvl+0x95/0xe0 printreport+0xcb/0x620 kasanreport+0xbd/0xf0 lockacquire+0x2aca/0x3a20 lockacquire+0x19b/0x520 rawspinlock+0x2b/0x40 attributecontainerunregister+0x30/0x160 fcreleasetransport+0x19/0x90 [scsitransportfc] bfadimmoduleexit+0x23/0x60 [bfa] bfadinit+0xdb/0xff0 [bfa] dooneinitcall+0xdc/0x550 doinitmodule+0x22d/0x6b0 loadmodule+0x4e96/0x5ff0 initmodulefromfile+0xcd/0x130 idempotentinitmodule+0x330/0x620 x64sysfinitmodule+0xb3/0x110 dosyscall64+0xc1/0x1d0 entrySYSCALL64afterhwframe+0x77/0x7f </TASK>

Allocated by task 25303: kasansavestack+0x24/0x50 kasansavetrack+0x14/0x30 kasankmalloc+0x7f/0x90 fcattachtransport+0x4f/0x4740 [scsitransportfc] bfadimmoduleinit+0x17/0x80 [bfa] bfadinit+0x23/0xff0 [bfa] dooneinitcall+0xdc/0x550 doinitmodule+0x22d/0x6b0 loadmodule+0x4e96/0x5ff0 initmodulefromfile+0xcd/0x130 idempotentinitmodule+0x330/0x620 x64sysfinitmodule+0xb3/0x110 dosyscall64+0xc1/0x1d0 entrySYSCALL64afterhwframe+0x77/0x7f

Freed by task 25303: kasansavestack+0x24/0x50 kasansavetrack+0x14/0x30 kasansavefreeinfo+0x3b/0x60 kasanslabfree+0x38/0x50 kfree+0x212/0x480 bfadimmoduleinit+0x7e/0x80 [bfa] bfadinit+0x23/0xff0 [bfa] dooneinitcall+0xdc/0x550 doinitmodule+0x22d/0x6b0 loadmodule+0x4e96/0x5ff0 initmodulefromfile+0xcd/0x130 idempotentinitmodule+0x330/0x620 x64sysfinitmodule+0xb3/0x110 dosyscall64+0xc1/0x1d0 entrySYSCALL64afterhwframe+0x77/0x7f

Above issue happens as follows:

bfadinit error = bfadimmoduleinit() fcreleasetransport(bfadimscsitransporttemplate); if (error) goto ext;

ext: bfadimmoduleexit(); fcreleasetransport(bfadimscsitransporttemplate); --> Trigger double release

Don't call bfadimmoduleexit() if bfadimmoduleinit() failed.

Other sources

This CVE was automatically created from a reference found in an email or other text. If you are reading this, then this CVE entry is probably erroneous, since this text should be replaced by the official CVE description automatically.

Launchpad

Affected Software

10 affected componentsFixes available
Linux Linux kernel>=2.6.32<4.19.325
Linux Linux kernel>=4.20<5.4.287
Linux Linux kernel>=5.5<5.10.231
Linux Linux kernel>=5.11<5.15.174
Linux Linux kernel>=5.16<6.1.120
Linux Linux kernel>=6.2<6.6.64
Linux Linux kernel>=6.7<6.11.11
Linux Linux kernel>=6.12<6.12.2
debian/linux<=5.10.223-1
5.10.234-16.1.129-16.1.135-16.12.22-16.12.25-1
debian/linux-6.1
6.1.129-1~deb11u1

Event History

Dec 27, 2024
CVE Published
via MITRE·01:50 PM
Data Sourced
via MITRE·01:50 PM
Description
Data Sourced
via NVD·02:15 PM
RemedyDescriptionSeverityWeaknessAffected Software
Feb 20, 2025
Data Sourced
via Launchpad·12:53 AM
Description
Apr 29, 2025
Data Sourced
via Ubuntu·01:11 AM
RemedyDescriptionSeverityAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2024-53227?

CVE-2024-53227 has been classified with a high severity level due to its use-after-free vulnerability in the Linux kernel.

2

How do I fix CVE-2024-53227?

To fix CVE-2024-53227, it is recommended to upgrade to a patched version of the Linux kernel that resolves this vulnerability.

3

Which versions of the Linux kernel are affected by CVE-2024-53227?

CVE-2024-53227 affects multiple versions of the Linux kernel ranging from 2.6.32 to 6.12.x.

4

What are the potential impacts of CVE-2024-53227?

The potential impacts of CVE-2024-53227 include unauthorized access and remote code execution due to the use-after-free condition.

5

Is there a workaround for CVE-2024-53227?

There are no known effective workarounds for CVE-2024-53227; upgrading to a secure kernel version is the recommended action.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203