To avoid kbind(2) becoming a powerful gadget, it is called inline to a
authorderaadt <deraadt@openbsd.org>
Tue, 12 Dec 2023 15:44:00 +0000 (15:44 +0000)
committerderaadt <deraadt@openbsd.org>
Tue, 12 Dec 2023 15:44:00 +0000 (15:44 +0000)
commit876ab33d5561c46eca0c22f9b5e53b79431b81c6
tree1810819f61acebe9196f7aeaf319460ee1ac40f4
parentd0c639df02d8acf30ecb2908ee151c4ef0d74a56
To avoid kbind(2) becoming a powerful gadget, it is called inline to a
function.  Therefore we cannot create a precise pinsyscall label.  Instead
create a duplicate entry (using inline asm) to force the kernel's pinsyscall
code to skip validation, rather than labelling it illegal.  kbind(2) remains
safe because it self-protects by checking its calling address.
ok kettenis
libexec/ld.so/loader.c