linux/arch/um
Michael Bommarito af421e9aed um: vector: fix use-after-free in vector_mmsg_rx()
When vector_mmsg_rx() discards a packet whose overlay header fails
verify_header(), it frees the skb and continues the loop:

	if (header_check < 0) {
		dev_kfree_skb_irq(skb);
		vp->estats.rx_encaps_errors++;
		continue;
	}

The normal and short-packet paths fall through to the bottom of the
loop body, which clears the consumed slot and advances the cursors:

	(*skbuff_vector) = NULL;
	mmsg_vector++;
	skbuff_vector++;

The verify_header() < 0 path skips that via continue, so the freed skb
is left in skbuff_vector[] and the cursors do not advance. The next
iteration reads the same slot, gets the freed skb, and frees it again,
producing a refcount underflow / use-after-free in the RX path.

Discard the slot the same way the other paths do before continuing.

Only transports whose verify_header() can return negative are affected:
GRE and L2TPv3 do so on a cookie/session-id mismatch (raw/tap do not),
so any peer on such a transport can trigger it without authentication.

Fixes: 49da7e64f3 ("High Performance UML Vector Network Driver")
Cc: stable@vger.kernel.org
Assisted-by: Claude:claude-opus-4-8
Signed-off-by: Michael Bommarito <michael.bommarito@gmail.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
2026-07-23 21:31:14 +02:00
..
configs um: Remove CONFIG_FRAME_WARN from x86_64_defconfig 2026-03-21 10:43:10 +01:00
drivers um: vector: fix use-after-free in vector_mmsg_rx() 2026-07-23 21:31:14 +02:00
include mm.git review status for mm-hotfixes-stable..mm-nonmm-stable 2026-06-21 13:20:19 -07:00
kernel genirq/proc: Increase default interrupt number precision to four 2026-05-26 16:21:14 +02:00
os-Linux arch/um: remove unused varible err in remove_files_and_dir() 2026-01-13 19:43:41 +01:00
scripts um: prevent user code in modules 2023-04-20 23:06:38 +02:00
.gitignore um: gitignore: Add kernel/capflags.c 2021-12-21 21:22:43 +01:00
Kbuild um: use obj-y to descend into arch/um/*/ 2023-08-26 22:41:34 +02:00
Kconfig um: Disable GCOV_PROFILE_ALL on 32-bit UML with Clang 20/21 2026-04-10 09:28:59 +02:00
Kconfig.debug um: Disable CONFIG_GCOV with MODULES 2021-04-15 23:10:33 +02:00
Makefile percpu: Sanitize __percpu_qual include hell 2026-06-03 11:38:48 +02:00
Makefile-os-Linux
Makefile-skas um: fix stub exe build with CONFIG_GCOV 2024-10-26 16:06:10 +02:00