# CVE-2023-54247: bpf: Silence a warning in btf\_type\_id\_size()

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

- **Severity:** UNSCORED
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Unknown
- **EPSS:** 0.26% (percentile 10, 2026-11-26)
- **Published:** 2025-12-30T12:15:45.395Z
- **Modified:** 2026-06-17T06:47:05.280Z

## Who should check

- Anyone running Linux \>= b5ea834dde6b6e7f75e51d5f66dac8cd7c97b5ef, \< 61f4bd46a03a81865aca3bcbad2f7b7032fb3160; \>= b5ea834dde6b6e7f75e51d5f66dac8cd7c97b5ef, \< 7c4f5ab63e7962812505cbd38cc765168a223acb; \>= b5ea834dde6b6e7f75e51d5f66dac8cd7c97b5ef, \< e6c2f594ed961273479505b42040782820190305
- Anyone running Linux 5.16

## Description

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

bpf: Silence a warning in btf\_type\_id\_size()

syzbot reported a warning in \[1\] with the following stacktrace:
  WARNING: CPU: 0 PID: 5005 at kernel/bpf/btf.c:1988 btf\_type\_id\_size+0x2d9/0x9d0 kernel/bpf/btf.c:1988
  ...
  RIP: 0010:btf\_type\_id\_size+0x2d9/0x9d0 kernel/bpf/btf.c:1988
  ...
  Call Trace:
   \<TASK\>
   map\_check\_btf kernel/bpf/syscall.c:1024 \[inline\]
   map\_create+0x1157/0x1860 kernel/bpf/syscall.c:1198
   \_\_sys\_bpf+0x127f/0x5420 kernel/bpf/syscall.c:5040
   \_\_do\_sys\_bpf kernel/bpf/syscall.c:5162 \[inline\]
   \_\_se\_sys\_bpf kernel/bpf/syscall.c:5160 \[inline\]
   \_\_x64\_sys\_bpf+0x79/0xc0 kernel/bpf/syscall.c:5160
   do\_syscall\_x64 arch/x86/entry/common.c:50 \[inline\]
   do\_syscall\_64+0x39/0xb0 arch/x86/entry/common.c:80
   entry\_SYSCALL\_64\_after\_hwframe+0x63/0xcd

With the following btf
  \[1\] DECL\_TAG 'a' type\_id=4 component\_idx=-1
  \[2\] PTR '(anon)' type\_id=0
  \[3\] TYPE\_TAG 'a' type\_id=2
  \[4\] VAR 'a' type\_id=3, linkage=static
and when the bpf\_attr.btf\_key\_type\_id = 1 (DECL\_TAG),
the following WARN\_ON\_ONCE in btf\_type\_id\_size() is triggered:
  if (WARN\_ON\_ONCE(!btf\_type\_is\_modifier(size\_type) &&
                   !btf\_type\_is\_var(size\_type)))
          return NULL;

Note that 'return NULL' is the correct behavior as we don't want
a DECL\_TAG type to be used as a btf\_{key,value}\_type\_id even
for the case like 'DECL\_TAG -\> STRUCT'. So there
is no correctness issue here, we just want to silence warning.

To silence the warning, I added DECL\_TAG as one of kinds in
btf\_type\_nosize() which will cause btf\_type\_id\_size() returning
NULL earlier without the warning.

  \[1\] https://lore.kernel.org/bpf/000000000000e0df8d05fc75ba86@google.com/

## Affected and fixed versions

- Linux: \>= b5ea834dde6b6e7f75e51d5f66dac8cd7c97b5ef, \< 61f4bd46a03a81865aca3bcbad2f7b7032fb3160; \>= b5ea834dde6b6e7f75e51d5f66dac8cd7c97b5ef, \< 7c4f5ab63e7962812505cbd38cc765168a223acb; \>= b5ea834dde6b6e7f75e51d5f66dac8cd7c97b5ef, \< e6c2f594ed961273479505b42040782820190305 (cvelist)
- Linux: 5.16 (cvelist)

## Mitigation

- No fix listed yet: follow the vendor advisory.

## Check your systems with an agent

Paste this into a coding agent:

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

Details: https://flawdb.com/CVE-2023-54247.md
Affected: Linux >= b5ea834dde6b6e7f75e51d5f66dac8cd7c97b5ef, < 61f4bd46a03a81865aca3bcbad2f7b7032fb3160; >= b5ea834dde6b6e7f75e51d5f66dac8cd7c97b5ef, < 7c4f5ab63e7962812505cbd38cc765168a223acb; >= b5ea834dde6b6e7f75e51d5f66dac8cd7c97b5ef, < e6c2f594ed961273479505b42040782820190305; Linux 5.16
Fixed in: Linux 61f4bd46a03a81865aca3bcbad2f7b7032fb3160, Linux 7c4f5ab63e7962812505cbd38cc765168a223acb

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-2023-54247 being exploited?

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

### How serious is CVE-2023-54247?

It has no CVSS score yet. Unknown.

### Which versions are affected by CVE-2023-54247?

Linux \>= b5ea834dde6b6e7f75e51d5f66dac8cd7c97b5ef, \< 61f4bd46a03a81865aca3bcbad2f7b7032fb3160; \>= b5ea834dde6b6e7f75e51d5f66dac8cd7c97b5ef, \< 7c4f5ab63e7962812505cbd38cc765168a223acb; \>= b5ea834dde6b6e7f75e51d5f66dac8cd7c97b5ef, \< e6c2f594ed961273479505b42040782820190305; Linux 5.16.

### Is there a fix for CVE-2023-54247?

Yes. Fixed in Linux 61f4bd46a03a81865aca3bcbad2f7b7032fb3160, Linux 7c4f5ab63e7962812505cbd38cc765168a223acb. No fix listed yet: follow the vendor advisory.

### How do I check if I'm affected by CVE-2023-54247?

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

- other: <https://git.kernel.org/stable/c/61f4bd46a03a81865aca3bcbad2f7b7032fb3160>
- other: <https://git.kernel.org/stable/c/7c4f5ab63e7962812505cbd38cc765168a223acb>
- other: <https://git.kernel.org/stable/c/e6c2f594ed961273479505b42040782820190305>

## 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-2023-54247>

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