opnsense-src/sys/netlink
Bjoern A. Zeeb 8bda9f9c56 netlink: fix accessing freed memory
The check for if_addrlen in dump_iface() is not sufficient to determine
if we still have a valid if_addr.  Rather than directly accessing if_addr
check the STAILQ (for the first entry).
This avoids panics when destroying cloned interfaces as experienced with
net80211 wlan ones.

Sponsored by:	The FreeBSD Foundation
Reviewed by:	jhibbits (earlier version), kp
Differential Revision: https://reviews.freebsd.org/D42027

(cherry picked from commit 7d48224073ce14f0dd3db2d4e96876ac928b52f2)
2023-10-06 12:47:39 +00:00
..
route netlink: fix accessing freed memory 2023-10-06 12:47:39 +00:00
ktest_netlink_message_writer.c netlink: use netlink mbufs in the mbuf chains. 2023-06-02 13:14:20 +00:00
ktest_netlink_message_writer.h netlink: use netlink mbufs in the mbuf chains. 2023-06-02 13:14:20 +00:00
netlink.h spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
netlink_bitset.h netlink: dump interface capabilities with other interface data. 2023-06-16 15:33:49 +00:00
netlink_ctl.h spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
netlink_debug.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
netlink_domain.c spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
netlink_generic.c netlink: add unregister call in cleanup 2023-09-25 09:45:06 -04:00
netlink_generic.h spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
netlink_generic_kpi.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
netlink_glue.c spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
netlink_io.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
netlink_linux.h spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
netlink_message_parser.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
netlink_message_parser.h netlink: Align allocations on __max_align_t, not uint64_t. 2023-08-10 11:12:52 -07:00
netlink_message_writer.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
netlink_message_writer.h spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
netlink_module.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
netlink_route.c netlink: add unregister call in cleanup 2023-09-25 09:45:06 -04:00
netlink_route.h netlink: dump interface capabilities with other interface data. 2023-06-16 15:33:49 +00:00
netlink_snl.h netlink: Align allocations on __max_align_t, not uint64_t. 2023-08-10 11:12:52 -07:00
netlink_snl_generic.h netlink: add snl(3) support for listing genetlink multicast groups 2023-05-27 11:13:14 +00:00
netlink_snl_route.h netlink: add IPv4/IPv6 attribute writers using in[6]_addr instead of 2023-05-19 09:45:49 +00:00
netlink_snl_route_compat.h spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
netlink_snl_route_parsers.h netlink: dump interface capabilities with other interface data. 2023-06-16 15:33:49 +00:00
netlink_sysevent.c kern: Move devctl_systems[] out of sys/sys/devctl.h 2023-06-08 12:28:04 -04:00
netlink_sysevent.h nlsysevent: add default command to the events 2023-06-02 14:22:10 +02:00
netlink_var.h netlink: use custom uma zone for the mbuf storage. 2023-06-01 06:43:39 +00:00