summaryrefslogtreecommitdiff
path: root/drivers/media/usb/ttusb-dec/git@git.tavy.me:linux.git
diff options
context:
space:
mode:
authorKyle Zeng <kylebot@openai.com>2026-06-06 01:10:31 -0700
committerPablo Neira Ayuso <pablo@netfilter.org>2026-06-10 17:59:01 +0200
commitf7f2fbb0e893a0238dc464f8d8c0f5609bec584f (patch)
treee2886b33a6821900694c7e4fc017a6a89c360de1 /drivers/media/usb/ttusb-dec/git@git.tavy.me:linux.git
parentc3009418f9fa1dcb3eb86f4d8c92583537b5faa3 (diff)
netfilter: x_tables: avoid leaking percpu counter pointers
The native and compat get-entries paths copy the fixed rule entry header from the kernelized rule blob to userspace before overwriting the entry's counter fields with a sanitized counter snapshot. On SMP kernels, entry->counters.pcnt contains the percpu allocation address used by x_tables rule counters. A caller can provide a userspace buffer that faults during the initial fixed-header copy after pcnt has been copied but before the later sanitized counter copy runs. The syscall then returns -EFAULT while leaving the raw percpu pointer in userspace. Copy only the fixed entry prefix before counters from the kernelized rule blob, then copy the sanitized counter snapshot into the counter field. Apply this ordering to the IPv4, IPv6, and ARP native and compat get-entries implementations so a fault cannot expose the internal percpu counter pointer. Fixes: 71ae0dff02d7 ("netfilter: xtables: use percpu rule counters") Signed-off-by: Kyle Zeng <kylebot@openai.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'drivers/media/usb/ttusb-dec/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions