bitVakt

Kernel Kit / Infix / v26.10.0latest

CVE-2026-98551

—unknown

linux6.18.60 · 6.18.54 · 6.18.8 · 6.12.21in 4 of 4 releases

Not yet analysed by NVD. Matched on the vendor's record; this may change when NVD has analysed it.

Reach linux · 8 builds in 4 of 4 releases

full reviewcross-check✓ a member decided

Description · NVD

perf/core: Fill branch entries with a single assignment

perf_clear_branch_entry_bitfields() clears the bitfields of struct perf_branch_entry one by one and leaves from/to alone, since callers overwrite those straight away. The list has to be kept in sync with the struct by hand and has already fallen behind: new_type and priv were added to perf_branch_entry and never added here.

Only BRBE writes those two, and neither for every record. brbe_set_perf_entry_type() leaves new_type alone for a branch type it does not recognise, and priv is not set for source-only records. arm_pmuv3.c allocates the per-CPU branch stack with kmalloc(), so such a record reaches userspace with whatever the slot held: uninitialised kmalloc() data on the first pass over the buffer, the previous record's values after that. Nothing under arch/x86/events/ writes either field, so only arm64 is affected.

Assign the whole entry at each site instead. Everything not named is then zero, and there is no list to keep in sync. The bitfields add up to exactly 64 bits, so the struct has no padding to leave undefined.

perf_clear_branch_entry_bitfields() has no callers left, so remove it. perf_entry_from_brbe_regset() assigns an empty literal instead, since it fills from/to conditionally. PERF_BR_SPEC_NA is 0, so dropping the explicit spec assignment changes nothing.

Published 2026-10-18NVD

References 2
Review Av26.10.0x86_64Not affectedFable 5.2 · high confidence · 2026-11-19

The fix is not in this tree, but the only vulnerable code is the arm64 BRBE driver drivers/perf/arm_brbe.c, and this image is an x86_64 kernel that does not compile it.

CONFIG_ARM64_BRBE depends on ARM_PMUV3 && ARM64; neither symbol is in the kernel .config, and output/objects.txt has no drivers/perf/ or arch/arm64/ objects.

The x86 LBR files that were compiled (arch/x86/events/intel/lbr.c, arch/x86/events/amd/lbr.c) are touched by the fix only as a refactor. Nothing under arch/x86/events/ writes or reads new_type or priv, and the x86 branch entries live in the statically initialised per-CPU cpu_hw_events, so those bits are always zero.

Evidence 12
  1. `perf_clear_branch_entry_bitfields()` still exists and does not clear `new_type` or `priv`, so the upstream fix is not applied in this source.

    output/build/linux-6.18.60/include/linux/perf_event.h:1467

  2. `struct perf_branch_entry` has the `new_type` and `priv` bitfields that the helper omits.

    output/build/linux-6.18.60/include/uapi/linux/perf_event.h:1459-1460

  3. The BRBE driver is the only code that sets `new_type` and `priv` (conditionally) after calling the incomplete helper; this is the vulnerable path.

    output/build/linux-6.18.60/drivers/perf/arm_brbe.c:574,607,645

  4. `arm_brbe.o` is built only under `CONFIG_ARM64_BRBE`.

    output/build/linux-6.18.60/drivers/perf/Makefile:27

  5. `ARM64_BRBE` depends on `ARM_PMUV3 && ARM64`.

    output/build/linux-6.18.60/drivers/perf/Kconfig:235-237

  6. `CONFIG_X86_64=y`; a search for `ARM_BRBE`, `ARM_PMUV3`, `ARM_PMU` and `CONFIG_ARM64` in this file returns nothing.

    output/build/linux-6.18.60/.config:312

  7. `BR2_x86_64=y` and `BR2_ARCH="x86_64"`: the target image is x86_64.

    output/.config:49,52

  8. No `drivers/perf/` or `arch/arm64/` objects were produced; the only CNA-listed files compiled are `arch/x86/events/amd/lbr.o` (line 24958) and `arch/x86/events/intel/lbr.o` (line 24969).

    output/objects.txt

  9. No x86 perf code writes or reads `new_type` or `priv`, matching the CVE statement that only arm64 is affected.

    output/build/linux-6.18.60/arch/x86/events/ (grep for new_type / priv)

  10. x86 `lbr_entries[]` sits inside the statically defined per-CPU `cpu_hw_events`, not in uninitialised heap memory, so the unwritten bits stay zero.

    output/build/linux-6.18.60/arch/x86/events/core.c:53 and arch/x86/events/perf_event.h:323

  11. `CONFIG_PERF_EVENTS_AMD_BRS` is not set, so `arch/x86/events/amd/brs.c` is not built either (it would not be vulnerable anyway).

    output/build/linux-6.18.60/.config:400

  12. No applied patch mentions BRBE, branch entries or `perf_clear_branch_entry_bitfields`.

    output/build/linux-6.18.60/.applied_patches_list

Version and patches

The source is unfixed: 6.18.60 still has perf_clear_branch_entry_bitfields() with its callers, and none of the applied Buildroot patches touch it. I could not read the upstream fix commits or the affected version range offline, so the fixed stable version is not determined. The build is not affected regardless, because the vulnerable driver is arm64-only (CONFIG_ARM64_BRBE) and this is an x86_64 kernel.

Recommendation

Document as not applicable for the x86_64 image; no backport is needed for this build. The fix will arrive with a routine stable kernel bump.

This conclusion covers only configs/x86_64_defconfig. Infix's aarch64 images should be triaged separately, since ARM64_BRBE is default y wherever ARM_PMUV3 is enabled.

Open questions

The exact affected range and fixed stable release could not be confirmed from the tree, because the upstream commits are not available offline.

drivers/perf/arm_pmuv3.c:1354 in this tree allocates the branch stack with kzalloc(), while the CVE text says kmalloc(). This does not matter for the x86_64 build but is worth noting when the arm64 images are reviewed.

One of my combined shell commands was rejected by the sandbox; I re-ran the same checks as separate read-only greps, so no evidence is missing.

Members of Kernel Kit decide. Sign in if you are one.