# CVE-2024-53227: scsi: bfa: Fix use-after-free in bfad\_im\_module\_exit()

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 7.8
- **CVSS:** 7.8 (v3.1, CNA) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.33% (percentile 18, 2026-11-26)
- **CWE:** CWE-416
- **Published:** 2024-12-27T13:50:16.175Z
- **Modified:** 2026-06-17T08:08:38.740Z

## Who should check

- Anyone running Linux \>= 7725ccfda59715ecf8f99e3b520a0b84cc2ea79e, \< 0ceac8012d3ddea3317f0d82934293d05feb8af1; \>= 7725ccfda59715ecf8f99e3b520a0b84cc2ea79e, \< 3932c753f805a02e9364a4c58b590f21901f8490; \>= 7725ccfda59715ecf8f99e3b520a0b84cc2ea79e, \< ef2c2580189ea88a0dcaf56eb3a565763a900edb; \>= 7725ccfda59715ecf8f99e3b520a0b84cc2ea79e, \< e76181a5be90abcc3ed8a300bd13878aa214d022; \>= 7725ccfda59715ecf8f99e3b520a0b84cc2ea79e, \< 8f5a97443b547b4c83f876f1d6a11df0f1fd4efb; \>= 7725ccfda59715ecf8f99e3b520a0b84cc2ea79e, \< c28409f851abd93b37969cac7498828ad533afd9; \>= 7725ccfda59715ecf8f99e3b520a0b84cc2ea79e, \< 1ffdde30a90bf8efe8f270407f486706962b3292; \>= 7725ccfda59715ecf8f99e3b520a0b84cc2ea79e, \< a2b5035ab0e368e8d8a371e27fbc72f133c0bd40; \>= 7725ccfda59715ecf8f99e3b520a0b84cc2ea79e, \< 178b8f38932d635e90f5f0e9af1986c6f4a89271
- Anyone running Linux 2.6.32

## 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.

## Affected and fixed versions

- Linux: \>= 7725ccfda59715ecf8f99e3b520a0b84cc2ea79e, \< 0ceac8012d3ddea3317f0d82934293d05feb8af1; \>= 7725ccfda59715ecf8f99e3b520a0b84cc2ea79e, \< 3932c753f805a02e9364a4c58b590f21901f8490; \>= 7725ccfda59715ecf8f99e3b520a0b84cc2ea79e, \< ef2c2580189ea88a0dcaf56eb3a565763a900edb; \>= 7725ccfda59715ecf8f99e3b520a0b84cc2ea79e, \< e76181a5be90abcc3ed8a300bd13878aa214d022; \>= 7725ccfda59715ecf8f99e3b520a0b84cc2ea79e, \< 8f5a97443b547b4c83f876f1d6a11df0f1fd4efb; \>= 7725ccfda59715ecf8f99e3b520a0b84cc2ea79e, \< c28409f851abd93b37969cac7498828ad533afd9; \>= 7725ccfda59715ecf8f99e3b520a0b84cc2ea79e, \< 1ffdde30a90bf8efe8f270407f486706962b3292; \>= 7725ccfda59715ecf8f99e3b520a0b84cc2ea79e, \< a2b5035ab0e368e8d8a371e27fbc72f133c0bd40; \>= 7725ccfda59715ecf8f99e3b520a0b84cc2ea79e, \< 178b8f38932d635e90f5f0e9af1986c6f4a89271 (cvelist)
- Linux: 2.6.32 (cvelist)

## Mitigation

- Upgrade Linux to 178b8f38932d635e90f5f0e9af1986c6f4a89271 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2024-53227. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2024-53227.md
Affected: Linux >= 7725ccfda59715ecf8f99e3b520a0b84cc2ea79e, < 0ceac8012d3ddea3317f0d82934293d05feb8af1; >= 7725ccfda59715ecf8f99e3b520a0b84cc2ea79e, < 3932c753f805a02e9364a4c58b590f21901f8490; >= 7725ccfda59715ecf8f99e3b520a0b84cc2ea79e, < ef2c2580189ea88a0dcaf56eb3a565763a900edb; >= 7725ccfda59715ecf8f99e3…
Fixed in: Linux 0ceac8012d3ddea3317f0d82934293d05feb8af1, Linux 3932c753f805a02e9364a4c58b590f21901f8490, Linux 8f5a97443b547b4c83f876f1d6a11df0f1fd4efb, Linux 1ffdde30a90bf8efe8f270407f486706962b3292, Linux 178b8f38932d635e90f5f0e9af1986c6f4a89271

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2024-53227 being exploited?

There is no confirmed exploitation: CVE-2024-53227 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.33% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2024-53227?

High: CVSS 7.8 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2024-53227?

Linux \>= 7725ccfda59715ecf8f99e3b520a0b84cc2ea79e, \< 0ceac8012d3ddea3317f0d82934293d05feb8af1; \>= 7725ccfda59715ecf8f99e3b520a0b84cc2ea79e, \< 3932c753f805a02e9364a4c58b590f21901f8490; \>= 7725ccfda59715ecf8f99e3b520a0b84cc2ea79e, \< ef2c2580189ea88a0dcaf56eb3a565763a900edb; \>= 7725ccfda59715ecf8f99e3b520a0b84cc2ea79e, \< e76181a5be90abcc3ed8a300bd13878aa214d022; \>= 7725ccfda59715ecf8f99e3b520a0b84cc2ea79e, \< 8f5a97443b547b4c83f876f1d6a11df0f1fd4efb; \>= 7725ccfda59715ecf8f99e3b520a0b84cc2ea79e, \< c28409f851abd93b37969cac7498828ad533afd9; \>= 7725ccfda59715ecf8f99e3b520a0b84cc2ea79e, \< 1ffdde30a90bf8efe8f270407f486706962b3292; \>= 7725ccfda59715ecf8f99e3b520a0b84cc2ea79e, \< a2b5035ab0e368e8d8a371e27fbc72f133c0bd40; \>= 7725ccfda59715ecf8f99e3b520a0b84cc2ea79e, \< 178b8f38932d635e90f5f0e9af1986c6f4a89271; Linux 2.6.32.

### Is there a fix for CVE-2024-53227?

Yes. Fixed in Linux 0ceac8012d3ddea3317f0d82934293d05feb8af1, Linux 3932c753f805a02e9364a4c58b590f21901f8490, Linux 8f5a97443b547b4c83f876f1d6a11df0f1fd4efb, Linux 1ffdde30a90bf8efe8f270407f486706962b3292, Linux 178b8f38932d635e90f5f0e9af1986c6f4a89271. Upgrade Linux to 178b8f38932d635e90f5f0e9af1986c6f4a89271 or later.

### How do I check if I'm affected by CVE-2024-53227?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/0ceac8012d3ddea3317f0d82934293d05feb8af1>
- patch: <https://git.kernel.org/stable/c/3932c753f805a02e9364a4c58b590f21901f8490>
- patch: <https://git.kernel.org/stable/c/ef2c2580189ea88a0dcaf56eb3a565763a900edb>
- patch: <https://git.kernel.org/stable/c/e76181a5be90abcc3ed8a300bd13878aa214d022>
- patch: <https://git.kernel.org/stable/c/8f5a97443b547b4c83f876f1d6a11df0f1fd4efb>
- patch: <https://git.kernel.org/stable/c/c28409f851abd93b37969cac7498828ad533afd9>
- patch: <https://git.kernel.org/stable/c/1ffdde30a90bf8efe8f270407f486706962b3292>
- patch: <https://git.kernel.org/stable/c/a2b5035ab0e368e8d8a371e27fbc72f133c0bd40>
- patch: <https://git.kernel.org/stable/c/178b8f38932d635e90f5f0e9af1986c6f4a89271>
- other: <https://lists.debian.org/debian-lts-announce/2025/03/msg00001.html>
- other: <https://lists.debian.org/debian-lts-announce/2025/03/msg00002.html>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2024-53227>

HTML: <https://flawdb.com/CVE-2024-53227> · JSON: <https://flawdb.com/api/v1/entries/CVE-2024-53227>
