Skip to contentSkip to conversation

CVE-2026-43228: hfs: Replace BUG_ON with error handling for CNID count checks

DISCUSSION Greg Kroah-Hartman 1 participant 1 message May 6

lore
Share & tools
lore
#0 lore raw

From: Greg Kroah-Hartman <[email protected]>

Description
===========

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

hfs: Replace BUG_ON with error handling for CNID count checks

In a06ec283e125 next_id, folder_count, and file_count in the super block info were expanded to 64 bits, and BUG_ONs were added to detect overflow. This triggered an error reported by syzbot: if the MDB is corrupted, the BUG_ON is triggered. This patch replaces this mechanism with proper error handling and resolves the syzbot reported bug.

The Linux kernel CVE team has assigned CVE-2026-43228 to this issue.

Affected and fixed versions
===========================

	Fixed in 6.19.6 with commit b6536c1ced315fa645576d3a39c6e07f2a472962
	Fixed in 7.0 with commit b226804532a875c10276168dc55ce752944096bd

Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.

Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at

	https://cve.org/CVERecord/?id=CVE-2026-43228

will be updated if fixes are backported, please check that for the most up to date information about this issue.

Affected files
==============

The file(s) affected by this issue are:

	fs/hfs/dir.c
	fs/hfs/hfs_fs.h
	fs/hfs/inode.c
	fs/hfs/mdb.c
	fs/hfs/super.c

Mitigation
==========

The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:

	https://git.kernel.org/stable/c/b6536c1ced315fa645576d3a39c6e07f2a472962
	https://git.kernel.org/stable/c/b226804532a875c10276168dc55ce752944096bd