opnsense-src/sys/net
Mark Johnston db57e9410d altq: Clear stats structures in get_class_stats()
These structures are copied out to userspace, and it's possible to leak
uninitialized stack bytes since these routines and their callers weren't
careful to clear them first.  Add memsets to avoid this.

Reported by:	Ilja Van Sprundel <ivansprundel@ioactive.com>
Reviewed by:	kp, emaste
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D53342

(cherry picked from commit ff08916e9ac689e6ce734de72325fc2bd9495a35)
2025-11-20 12:23:45 -05:00
..
altq altq: Clear stats structures in get_class_stats() 2025-11-20 12:23:45 -05:00
route routing: do not allow PINNED routes to be overriden 2025-03-18 12:09:33 +03:00
bpf.c IfAPI: fix LINT-NOIP build 2025-09-08 10:26:29 +02:00
bpf.h bpf: Make bpf.h self-contained 2025-05-07 12:05:08 +00:00
bpf_buffer.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
bpf_buffer.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
bpf_filter.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
bpf_jitter.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
bpf_jitter.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
bpf_zerocopy.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
bpf_zerocopy.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
bpfdesc.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
bridgestp.c bridgestp: Use static initializers 2025-03-13 18:13:50 +08:00
bridgestp.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
debugnet.c debugnet: Use precise types when accessing mbuf contents 2024-10-18 12:28:09 +00:00
debugnet.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
debugnet_inet.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
debugnet_int.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
dlt.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
ethernet.h sys/net: add a new ether_vlanid_t type 2025-07-09 10:05:42 +02:00
firewire.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
ieee8023ad_lacp.c net: if_media for 1000Base-BX BiDi 2025-03-02 13:56:38 -07:00
ieee8023ad_lacp.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
ieee_oui.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
if.c net: Validate interface group names in ioctl handlers 2025-11-20 12:23:16 -05:00
if.h ifnet: Add handling for toggling IFF_ALLMULTI in ifhwioctl() 2024-09-20 11:39:16 +00:00
if_arp.h Support ARP for 802 networks 2024-04-27 10:45:22 -04:00
if_bridge.c EtherIP: Fix passing the address family from if_bridge(4) to gif(4) 2025-10-06 17:21:04 +02:00
if_bridgevar.h net/if_bridgevar.h: add include guard 2025-07-09 10:05:42 +02:00
if_clone.c if_clone: Use static initializers 2025-03-13 18:13:50 +08:00
if_clone.h if_clone: Use static initializers 2025-03-13 18:13:50 +08:00
if_dead.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
if_disc.c net: Remove unneeded NULL check for the allocated ifnet 2024-07-12 20:03:37 +08:00
if_dl.h link_addr: be more strict about address formats 2025-07-09 10:05:44 +02:00
if_edsc.c net: Remove unneeded NULL check for the allocated ifnet 2024-07-12 20:03:37 +08:00
if_enc.c if_enc(4): Use new KPI to create enc interface 2024-10-20 21:43:01 +08:00
if_enc.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
if_epair.c epair: add support for checksum offloading 2025-10-07 12:15:01 +02:00
if_ethersubr.c ethernet: Prefer memcmp() over bcmp() 2025-10-06 17:00:38 +02:00
if_fwsubr.c if_firewire: Make firewire_broadcastaddr static const 2025-07-09 10:05:51 +02:00
if_gif.c EtherIP: Fix passing the address family from if_bridge(4) to gif(4) 2025-10-06 17:21:04 +02:00
if_gif.h sys: Remove $FreeBSD$: one-line .c comment pattern 2023-08-16 11:54:24 -06:00
if_gre.c rss: add sysctl enable toggle 2025-07-09 10:05:48 +02:00
if_gre.h sys: Remove $FreeBSD$: one-line .h pattern 2023-08-16 11:54:18 -06:00
if_infiniband.c if_infininband: Support BPF write for broadcast frames 2025-03-02 16:41:29 -08:00
if_ipsec.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
if_ipsec.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
if_lagg.c lagg: Fix if_hw_tsomax_update() not being called 2025-07-28 10:16:11 +02:00
if_lagg.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
if_llatbl.c if_llatbl: Fix a typo in a KASSERT message 2024-01-25 07:47:31 +01:00
if_llatbl.h sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
if_llc.h sys: Remove $FreeBSD$: one-line .h pattern 2023-08-16 11:54:18 -06:00
if_loop.c net: Remove unneeded NULL check for the allocated ifnet 2024-07-12 20:03:37 +08:00
if_me.c bpf: Make BPF interop consistent with if_loop 2024-05-08 09:06:15 -04:00
if_media.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
if_media.h net: if_media for 1000Base-BX BiDi 2025-03-02 13:56:38 -07:00
if_mib.c sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
if_mib.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
if_ovpn.c if_ovpn: support IPv6 link-local addresses 2025-09-08 10:20:17 +02:00
if_ovpn.h if_ovpn: support floating clients 2025-09-08 10:20:17 +02:00
if_pflog.h pflog: pass the action to pflog directly 2025-07-09 10:05:50 +02:00
if_pfsync.h sys: Remove $FreeBSD$: one-line .h pattern 2023-08-16 11:54:18 -06:00
if_private.h IfAPI: Hide the macros that touch ifnet members 2023-04-24 09:54:23 -04:00
if_stf.c net: Remove unneeded NULL check for the allocated ifnet 2024-07-12 20:03:37 +08:00
if_stf.h if_stf: make if_stf.h self-contained 2021-12-17 12:38:34 +01:00
if_strings.h ifnet: fix if_strings.h build check 2023-06-16 15:54:29 +00:00
if_tap.h sys: Remove $FreeBSD$: one-line .h pattern 2023-08-16 11:54:18 -06:00
if_tun.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
if_tuntap.c Internal scheduling priorities: Always use symbolic ones 2025-07-31 12:42:21 +02:00
if_types.h sys: add MBIM (mobile broadband interface module) interface type. 2025-10-06 17:15:22 +02:00
if_var.h IfAPI: restore KBI after bceb9c2f2b19 2025-09-08 10:26:17 +02:00
if_vlan.c if_vlan: Fix up if_type before attaching the interface 2025-07-09 10:05:52 +02:00
if_vlan_var.h if_vlan_var.h: fix value of DOT1Q_VID_MAX 2025-07-09 10:05:45 +02:00
if_vxlan.c if_vxlan: fix byteorder of source port 2025-11-20 12:20:49 -05:00
if_vxlan.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
ifdi_if.m iflib: invert default restart on VLAN changes 2023-08-24 13:48:19 -07:00
iflib.c iflib: Set the get counter routine prior to attaching the interface 2025-10-06 17:00:23 +02:00
iflib.h iflib(4): Replace admin taskqueue group with per-interface taskqueues 2025-04-27 16:02:58 -06:00
ifq.c IfAPI: Explicitly include <net/if_private.h> in netstack 2023-01-31 15:02:16 -05:00
ifq.h sys: Remove $FreeBSD$: one-line .h pattern 2023-08-16 11:54:18 -06:00
infiniband.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
mp_ring.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
mp_ring.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
mppc.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
mppcc.c sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
mppcd.c sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
netisr.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
netisr.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
netisr_internal.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
netmap.h sys: Remove $FreeBSD$: one-line .h pattern 2023-08-16 11:54:18 -06:00
netmap_legacy.h sys: Remove $FreeBSD$: one-line .h pattern 2023-08-16 11:54:18 -06:00
netmap_user.h sys: Remove $FreeBSD$: one-line .h pattern 2023-08-16 11:54:18 -06:00
netmap_virt.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
paravirt.h sys: Remove $FreeBSD$: one-line .h pattern 2023-08-16 11:54:18 -06:00
pfil.c pfil: PFIL_PASS never frees the mbuf 2025-07-09 10:05:50 +02:00
pfil.h sys: Remove $FreeBSD$: one-line .c comment pattern 2023-08-16 11:54:24 -06:00
pfkeyv2.h sys: Remove $FreeBSD$: one-line .c comment pattern 2023-08-16 11:54:24 -06:00
pfvar.h pf: backport changes around the following commit #242 2025-07-09 10:05:51 +02:00
ppp_defs.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
radix.c sys: Remove $FreeBSD$: one-line .h pattern 2023-08-16 11:54:18 -06:00
radix.h sys: Remove $FreeBSD$: one-line .h pattern 2023-08-16 11:54:18 -06:00
rndis.h sys: Remove $FreeBSD$: one-line .c comment pattern 2023-08-16 11:54:24 -06:00
route.c sys: Remove $FreeBSD$: one-line .h pattern 2023-08-16 11:54:18 -06:00
route.h sys: Remove $FreeBSD$: one-line .h pattern 2023-08-16 11:54:18 -06:00
rss_config.c rss: add sysctl enable toggle 2025-07-09 10:05:48 +02:00
rss_config.h rss: add sysctl enable toggle 2025-07-09 10:05:48 +02:00
rtsock.c socket: Move SO_SETFIB handling to protocol layers 2025-02-21 01:04:50 +00:00
sff8436.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
sff8472.h net/sff8472.h: add double-include protection 2025-07-09 10:05:42 +02:00
slcompress.c sys: Remove $FreeBSD$: one-line .h pattern 2023-08-16 11:54:18 -06:00
slcompress.h sys: Remove $FreeBSD$: one-line .h pattern 2023-08-16 11:54:18 -06:00
toeplitz.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
toeplitz.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
vnet.c vnet: Use static initializers 2025-03-13 18:13:51 +08:00
vnet.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00