freebsd-skq/sys
Mark Johnston e4b16f2fb1 ktrace: Avoid recursion in namei()
sys_ktrace() calls namei(), which may call ktrnamei().  But sys_ktrace()
also calls ktrace_enter() first, so if the caller is itself being
traced, the assertion in ktrace_enter() is triggered.  And, ktrnamei()
does not check for recursion like most other ktrace ops do.

Fix the bug by simply deferring the ktrace_enter() call.

Also make the parameter to ktrnamei() const and convert to ANSI.

Reported by:	syzbot+d0a4de45e58d3c08af4b@syzkaller.appspotmail.com
Reviewed by:	kib
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D30340
2021-05-22 12:07:32 -04:00
..
amd64 linux: refactor bsd_to_linux_regset() out of linux_ptrace.c 2021-05-21 07:26:07 +01:00
arm arm: allwinner: aw_mmc: Check regulators status before enabling/disabling them 2021-05-21 17:39:47 +02:00
arm64 arm64: rockchip: gpio: Give friendlier name to gpio 2021-05-21 17:35:43 +02:00
bsm
cam mmccam: Add two new XPT for MMC and use them in mmc_sim and sdhci 2021-05-21 17:34:05 +02:00
cddl fbt: Remove some handling for multiple CTF containers 2021-04-02 17:49:13 -04:00
compat There is a window where threads are removed from the process list and where 2021-05-21 13:18:41 +02:00
conf mmc: Only build mmc_fdt_helper and mmc_pwrseq for arch that uses ext_resources 2021-05-21 19:35:20 +02:00
contrib sys/*/conf/*, docs: fix links to handbook 2021-05-20 09:27:10 +01:00
crypto ossl: Don't encryt/decrypt too much data for chacha20. 2021-04-01 15:49:07 -07:00
ddb fix style nit: space after if 2021-05-05 15:26:09 -06:00
dev run(4): add support for ASUS USB-N14 wireless adaptor. 2021-05-22 13:52:12 +03:00
dts arm64: rockchip: Add some DTSO to disable sd/mmc 2021-05-13 18:15:31 +02:00
fs Move mnt_maxsymlinklen into appropriate fs mount data structures 2021-05-22 15:16:09 +03:00
gdb gdb: report specific stop reason for watchpoints 2021-03-30 11:36:41 -03:00
geom gmultipath: make physpath distinct from the underlying providers' 2021-05-06 12:32:27 -06:00
gnu
i386 sys/*/conf/*, docs: fix links to handbook 2021-05-20 09:27:10 +01:00
isa Remove more remnants of sio(4) 2021-04-07 14:33:02 -04:00
kern ktrace: Avoid recursion in namei() 2021-05-22 12:07:32 -04:00
kgssapi opencrypto: Introduce crypto_dispatch_async() 2021-02-08 09:19:19 -05:00
libkern Use '.arch_extension crc' in the arm64 crc32 code 2021-05-06 07:42:35 +00:00
mips sys/*/conf/*, docs: fix links to handbook 2021-05-20 09:27:10 +01:00
modules modules: Only build sdhci_fdt for arm and arm64 2021-05-13 20:23:59 +02:00
net pf: Track the original kif for floating states 2021-05-20 12:49:27 +02:00
net80211 net80211: prefix get_random_bytes() with net80211_ 2021-03-24 22:16:09 +00:00
netgraph Fix packet cbs/ebs conversion. 2021-05-19 11:04:08 -04:00
netinet tcp: Handle stack switch while processing socket options 2021-05-22 14:39:36 +02:00
netinet6 Fix mbuf leaks in various pru_send implementations 2021-05-12 13:00:09 -04:00
netipsec Add missing sockaddr length and family validation to various protocols 2021-05-03 13:35:19 -04:00
netpfil pf: Support killing floating states by interface 2021-05-20 12:49:27 +02:00
netsmb
nfs Fix panic when using BOOTP to resolve root path. 2021-03-28 14:02:40 -05:00
nfsclient nfs: Cleanup dead files 2021-03-17 06:16:31 +11:00
nfsserver nfs: Cleanup dead files 2021-03-17 06:16:31 +11:00
nlm
ofed Add missing sockaddr length and family validation to various protocols 2021-05-03 13:35:19 -04:00
opencrypto cryptodev: Fix some input validation bugs 2021-05-11 17:36:12 -04:00
powerpc cam: clear on-stack CCBs in last few drivers 2021-05-21 08:53:59 +01:00
riscv sys/*/conf/*, docs: fix links to handbook 2021-05-20 09:27:10 +01:00
rpc nfsd: fix a NFSv4.1 Linux client mount stuck in CLOSE_WAIT 2021-04-27 15:32:35 -07:00
security tcp_input/syncache: acquire only read lock on PCB for SYN,!ACK packets 2021-04-12 08:25:31 -07:00
sys ktrace: Avoid recursion in namei() 2021-05-22 12:07:32 -04:00
teken
tests Revise FIB lookups per second benchmarking routines. 2021-05-05 12:28:17 +02:00
tools makesyscalls.lua: improve generated file style(9) compliance 2021-05-13 13:59:25 -04:00
ufs Move mnt_maxsymlinklen into appropriate fs mount data structures 2021-05-22 15:16:09 +03:00
vm vm: add another pager private flag 2021-05-15 20:47:29 +00:00
x86 x86/xen: further PVHv1 removal cleanup 2021-05-18 10:43:31 +02:00
xdr
xen x86/xen: remove PVHv1 code 2021-05-17 11:41:21 +02:00
Makefile