Skip to contentSkip to conversation

CVE-2025-38639: netfilter: xt_nfacct: don't assume acct name is null-terminated

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Aug 22, 2025

lore
Share & tools
lore
#0 lore raw

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

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

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

netfilter: xt_nfacct: don't assume acct name is null-terminated

BUG: KASAN: slab-out-of-bounds in .. lib/vsprintf.c:721
Read of size 1 at addr ffff88801eac95c8 by task syz-executor183/5851
[..]
 string+0x231/0x2b0 lib/vsprintf.c:721
 vsnprintf+0x739/0xf00 lib/vsprintf.c:2874
 [..]
 nfacct_mt_checkentry+0xd2/0xe0 net/netfilter/xt_nfacct.c:41
 xt_check_match+0x3d1/0xab0 net/netfilter/x_tables.c:523

nfnl_acct_find_get() handles non-null input, but the error printk relied on its presence.

The Linux kernel CVE team has assigned CVE-2025-38639 to this issue.

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

	Issue introduced in 3.3 with commit ceb98d03eac5704820f2ac1f370c9ff385e3a9f5 and fixed in 6.1.148 with commit e18939176e657a3a20bfbed357b8c55a9f82aba3
	Issue introduced in 3.3 with commit ceb98d03eac5704820f2ac1f370c9ff385e3a9f5 and fixed in 6.6.102 with commit 58004aa21e79addaf41667bfe65e93ec51653f18
	Issue introduced in 3.3 with commit ceb98d03eac5704820f2ac1f370c9ff385e3a9f5 and fixed in 6.12.42 with commit 7c1ae471da69c09242834e956218ea6a42dd405a
	Issue introduced in 3.3 with commit ceb98d03eac5704820f2ac1f370c9ff385e3a9f5 and fixed in 6.15.10 with commit 58007fc7b94fb2702000045ff401eb7f5bde7828
	Issue introduced in 3.3 with commit ceb98d03eac5704820f2ac1f370c9ff385e3a9f5 and fixed in 6.16.1 with commit df13c9c6ce1d55c31d1bd49db65a7fbbd86aab13
	Issue introduced in 3.3 with commit ceb98d03eac5704820f2ac1f370c9ff385e3a9f5 and fixed in 6.17-rc1 with commit bf58e667af7d96c8eb9411f926a0a0955f41ce21

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-2025-38639

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:
net/netfilter/xt_nfacct.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/e18939176e657a3a20bfbed357b8c55a9f82aba3
	https://git.kernel.org/stable/c/58004aa21e79addaf41667bfe65e93ec51653f18
	https://git.kernel.org/stable/c/7c1ae471da69c09242834e956218ea6a42dd405a
	https://git.kernel.org/stable/c/58007fc7b94fb2702000045ff401eb7f5bde7828
	https://git.kernel.org/stable/c/df13c9c6ce1d55c31d1bd49db65a7fbbd86aab13
	https://git.kernel.org/stable/c/bf58e667af7d96c8eb9411f926a0a0955f41ce21