opnsense-src/sys/compat
Konstantin Belousov 8a44a2c644 elf_note_prpsinfo: handle more failures from proc_getargv()
Resulting sbuf_len() from proc_getargv() might return 0 if user mangled
ps_strings enough. Also, sbuf_len() API contract is to return -1 if the
buffer overflowed. The later should not occur because get_ps_strings()
checks for catenated length, but check for this subtle detail explicitly
as well to be more resilent.

The end result is that p_comm is used in this situations.

Approved by:	so
Security:	FreeBSD-SA-22:09.elf
Reported by:	Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
Reviewed by:	delphij, markj
admbugs:	988
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D35391

(cherry picked from commit 00d17cf342)
2022-08-09 15:47:32 -04:00
..
cloudabi umtx: Split umtx.h on two counterparts. 2022-06-17 22:33:15 +03:00
cloudabi32 regen syscall files after 0bd5d81f1e 2021-05-19 20:32:47 -04:00
cloudabi64 regen syscall files after 0bd5d81f1e 2021-05-19 20:32:47 -04:00
freebsd32 Finish cpuset_getaffinity() after f35093f8 2022-06-17 22:35:31 +03:00
ia32 Retire sv_transtrap 2022-06-17 22:35:27 +03:00
lindebugfs lindebugfs: The Linux file operations use negative return values in the kernel. 2022-03-17 10:55:07 +01:00
linprocfs linprocfs: Decode SGX CPU feature in cpuinfo 2022-07-13 14:48:38 +03:00
linsysfs linsysfs: plug set-but-not-used vars. 2022-06-17 22:33:49 +03:00
linux elf_note_prpsinfo: handle more failures from proc_getargv() 2022-08-09 15:47:32 -04:00
linuxkpi/common vm_object: Modify various drivers to allocate OBJT_SWAP objects 2022-07-27 09:50:51 -04:00
ndis compat: clean up empty lines in .c and .h files 2020-09-01 21:24:33 +00:00
x86bios Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many) 2020-02-26 14:26:36 +00:00