aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/netmap
diff options
context:
space:
mode:
authorKonstantin Belousov <kib@FreeBSD.org>2022-06-03 08:21:23 +0000
committerMark Johnston <markj@FreeBSD.org>2022-08-09 19:47:32 +0000
commit8a44a2c644fc6d4ec1740fcc0b3ff01eac989ddf (patch)
tree87c32d62ae14695357e1cb9b67540de5d8a69d31 /sys/dev/netmap
parent78209289fe4b9c239b7e34201022ac84b5440470 (diff)
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 00d17cf342cd9f4f8fd1dcd79c8caec359145532)
Diffstat (limited to 'sys/dev/netmap')
0 files changed, 0 insertions, 0 deletions