freebsd-nq/sys/compat/linux
Konstantin Belousov 00d17cf342 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
2022-08-09 15:44:45 -04:00
..
check_error.d
check_internal_locks.d
linux_common.c
linux_common.h linux(4): Cleanup empty lines. 2022-03-31 21:23:12 +03:00
linux_dtrace.h
linux_dummy.c linux(4): Add epoll_pwai2 syscall. 2022-04-26 19:35:59 +03:00
linux_elf32.c
linux_elf64.c
linux_elf.c elf_note_prpsinfo: handle more failures from proc_getargv() 2022-08-09 15:44:45 -04:00
linux_elf.h
linux_emul.c linux(4): Cleanup empty lines. 2022-03-31 21:23:12 +03:00
linux_emul.h linux(4): Handle SO_TIMESTAMPNS socket option 2022-05-28 23:46:05 +03:00
linux_errno.c
linux_errno.h linux: Fix ptrace panic with ERESTART 2021-10-29 14:55:59 +01:00
linux_errno.inc
linux_event.c AST: rework 2022-08-02 21:11:09 +03:00
linux_event.h
linux_file.c linux(4): Fix unlinkat() after a125ed50 2022-05-23 13:19:34 +03:00
linux_file.h linux(4): Add AT_NO_AUTOMOUNT to statx. 2022-03-25 17:54:23 +03:00
linux_fork.c thread_create(): call cpu_copy_thread() after td_pflags is zeroed 2022-08-08 19:44:17 +03:00
linux_fork.h
linux_futex.c linux(4): To improve readability use FUTEX_UNOWNED instead of 0 2022-05-19 21:42:38 +03:00
linux_futex.h
linux_getcwd.c
linux_ioctl.c linux: add sysctl to pass untranslated interface names 2022-01-17 09:35:15 +00:00
linux_ioctl.h linux: Improve debugging by recognizing TIOCGPTPEER 2022-01-10 15:36:11 +00:00
linux_ipc64.h
linux_ipc.c linux(4): Add a helper intended for copying timespec's from the userspace. 2022-05-08 16:16:47 +03:00
linux_ipc.h linux(4): Implement semtimedop syscalls. 2022-05-06 20:02:59 +03:00
linux_mib.c linux: Make compat.linux.preserve_vstatus default to 1 2022-01-17 08:45:01 +00:00
linux_mib.h linux(4): Rid unused defines from linux_mib. 2022-03-31 20:45:12 +03:00
linux_misc.c linux(4): Trace Linux l_sigset_t. 2022-06-22 14:09:54 +03:00
linux_misc.h linux(4): Add AT_MINSIGSTKSZ to arm64 port 2022-05-15 21:12:03 +03:00
linux_mmap.c Use vmspace->vm_stacktop in place of sv_usrstack in more places. 2022-02-14 10:57:30 -08:00
linux_mmap.h
linux_persona.h
linux_ptrace.c Add security.bsd.allow_ptrace sysctl 2022-01-22 19:36:56 +02:00
linux_rseq.c linux(4): Add a simple rseq syscall implementation. 2022-04-26 19:35:56 +03:00
linux_siginfo.h linux(4): Add kernel signal code definitions 2022-05-19 19:55:56 +03:00
linux_signal.c linux(4): Fix a typo in a source code comment 2022-07-16 13:39:17 +02:00
linux_signal.h linux(4): Trace Linux l_sigset_t. 2022-06-22 14:09:54 +03:00
linux_socket.c linux(4): Handle multiple mbufs in a control message chain in recvmsg 2022-05-28 23:48:45 +03:00
linux_socket.h linux(4): Handle IP_ORIGDSTADDR socket option for IPPROTO_IP protocol level 2022-05-28 23:47:40 +03:00
linux_stats.c linux(4): Cleanup empty lines. 2022-03-31 21:23:12 +03:00
linux_sysctl.c linux: plug a set-but-not-used var 2022-04-19 12:45:57 +00:00
linux_sysproto.h
linux_time.c linux(4): Return EINVAL when the clockid has invalid bits are set 2022-05-31 11:46:15 +03:00
linux_timer.c linux(4): Implement timer_settime64 syscall. 2022-05-04 13:06:49 +03:00
linux_timer.h linux(4): Add a helper intended for copying timespec's from the userspace. 2022-05-08 16:16:47 +03:00
linux_uid16.c linux: remove the always curthread argument from lconvpath 2021-11-25 22:50:42 +00:00
linux_util.c Adjust linux_get_char_devices() definition to avoid clang 15 warning 2022-07-25 00:40:13 +02:00
linux_util.h linux(4): Add LINUX_RATELIMIT_MSG_OPT2 for future use 2022-05-28 23:47:23 +03:00
linux_vdso_gtod.inc linux(4): Implement __vdso_time 2022-07-04 23:41:32 +03:00
linux_vdso.c
linux_vdso.h
linux_videodev2_compat.h
linux_videodev_compat.h
linux.c linux(4): Refactor SIGPWR mapping 2022-05-30 19:55:49 +03:00
linux.h linux(4): Trace Linux l_sigset_t. 2022-06-22 14:09:54 +03:00
stats_timing.d
trace_futexes.d