HomeFreeBSD

kasan: Disable validation of function parameters passed by value

Description

kasan: Disable validation of function parameters passed by value

It appears that the emitted code in the caller does not update shadow
state for values passed on the stack to the callee, which it seemingly
ought to do after pushing values on the stack and prior to the call
itself. This leaves open a window where an interrupt handler can cause
regions of the stack containing these values to be poisoned, resulting
in rare false positive reports. This happens particularly in the amd64
TLB invalidation code, where we liberally pass cpuset_t's around by
value.

LLVM has a flag to disable validation of accesses of function parameters
passed by value. Such validation is itself a relatively new feature.
Turn it off for now.

Reported by: pho, syzkaller
Sponsored by: The FreeBSD Foundation

(cherry picked from commit 2a519c3b14c29688e42d11f916655318b13c8409)

Details

Provenance
markjAuthored on Nov 3 2021, 4:28 PM
Parents
rGaff57157db04: nfscl: Fix forced dismount when "nconnect" is specified
Branches
Unknown
Tags
Unknown