opnsense-src/sys/dev/netmap
Mark Johnston 10516aac41 netmap: Fix driver name handling
if_initname() requires the caller to ensure that the lifetime of the
interface's name buffer contains that of the ifnet itself.
netmap_vi_create() wasn't respecting that; we were instead passing the
stack-allocated buffer provided by the ioctl handler.

While here, add a check to avoid assuming that the caller-provided
buffer is nul-terminated.

Reported by:	syzkaller
Reviewed by:	vmaffione
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D58676

(cherry picked from commit 800d5b7a8a4f5665ced0453e090f8d563366bd47)
2026-08-26 10:21:42 +02:00
..
if_ptnet.c
if_re_netmap.h
if_vtnet_netmap.h
netmap.c
netmap_bdg.c netmap: Don't assume that user-provided strings are nul-terminated 2026-08-11 08:20:56 +02:00
netmap_bdg.h
netmap_freebsd.c netmap: Fix a race in kqueue registration 2026-08-26 10:21:02 +02:00
netmap_generic.c
netmap_kern.h netmap: Fix driver name handling 2026-08-26 10:21:42 +02:00
netmap_kloop.c netmap: silence -Wdefault-const-init-field-unsafe warning 2026-07-06 11:03:10 +02:00
netmap_legacy.c
netmap_mbq.c
netmap_mbq.h
netmap_mem2.c netmap: Let memory allocator parameters be settable via loader.conf 2025-12-29 14:31:30 +00:00
netmap_mem2.h
netmap_monitor.c
netmap_null.c
netmap_offloadings.c
netmap_pipe.c
netmap_vale.c netmap: Fix driver name handling 2026-08-26 10:21:42 +02:00