opnsense-src/sys/dev/usb/net
Pierre Pronchery 82c41c9ffc umb: avoid wild pointer dereference in umb_decap()
When processing messages produced by the USB device, umb_decap() trusts
ptroff and later dlen and doff with pointer arithmetic, without
sufficient sanity checks. The resulting pointer address may be outside
of the valid boundary, causing the wrong memory to be copied or a page
fault.

This fix from Gerhard Roth was obtained after coordination upstream with
OpenBSD. It converts the variables to 64-bit integers, which should
mitigate the risk of overflows.

PR:             284920
Reported by:    Robert Morris <rtm@lcs.mit.edu>
Approved by:	philip (mentor)
Sponsored by:   The FreeBSD Foundation
2025-05-29 15:07:57 +02:00
..
if_aue.c usb: Kill left-over cdefs.h includes 2025-03-04 14:44:22 -07:00
if_auereg.h
if_axe.c usb: Kill left-over cdefs.h includes 2025-03-04 14:44:22 -07:00
if_axereg.h
if_axge.c usb: Kill left-over cdefs.h includes 2025-03-04 14:44:22 -07:00
if_axgereg.h
if_cdce.c usb: Kill left-over cdefs.h includes 2025-03-04 14:44:22 -07:00
if_cdceem.c usb: Kill left-over cdefs.h includes 2025-03-04 14:44:22 -07:00
if_cdcereg.h
if_cue.c usb: Kill left-over cdefs.h includes 2025-03-04 14:44:22 -07:00
if_cuereg.h
if_ipheth.c usb: Kill left-over cdefs.h includes 2025-03-04 14:44:22 -07:00
if_iphethvar.h
if_kue.c usb: Kill left-over cdefs.h includes 2025-03-04 14:44:22 -07:00
if_kuefw.h
if_kuereg.h
if_mos.c usb/if_mos.c: Fix incorrect SPDX ID 2025-05-28 17:08:00 -04:00
if_mosreg.h
if_muge.c usb: Kill left-over cdefs.h includes 2025-03-04 14:44:22 -07:00
if_mugereg.h
if_rue.c usb: Kill left-over cdefs.h includes 2025-03-04 14:44:22 -07:00
if_ruereg.h
if_smsc.c usb: Kill left-over cdefs.h includes 2025-03-04 14:44:22 -07:00
if_smscreg.h
if_udav.c usb: Kill left-over cdefs.h includes 2025-03-04 14:44:22 -07:00
if_udavreg.h
if_umb.c umb: avoid wild pointer dereference in umb_decap() 2025-05-29 15:07:57 +02:00
if_umbreg.h umb: Introduce the USB umb(4) network driver 2025-01-20 23:46:15 +00:00
if_ure.c usb: if_ure: stop touching the mbuf accounting on rxq insertion 2025-04-20 13:28:12 -05:00
if_urereg.h
if_urndis.c usb: Kill left-over cdefs.h includes 2025-03-04 14:44:22 -07:00
if_urndisreg.h
if_usie.c if_usie: fix typo 2024-09-22 00:56:37 +02:00
if_usievar.h
mbim.h umb: Introduce the USB umb(4) network driver 2025-01-20 23:46:15 +00:00
ruephy.c usb: Kill left-over cdefs.h includes 2025-03-04 14:44:22 -07:00
ruephyreg.h
uhso.c net: Remove unneeded NULL check for the allocated ifnet 2024-06-28 18:16:29 +08:00
usb_ethernet.c usb: if_ure: stop touching the mbuf accounting on rxq insertion 2025-04-20 13:28:12 -05:00
usb_ethernet.h