On 08-May-2026 11:40:54 AM, Joshua Peisach wrote: > On Thu May 7, 2026 at 3:05 AM EDT, Sasha Levin wrote: > > > > For many such issues the simplest mitigation is to stop calling the buggy > > function. Killswitch provides that. An admin writes: > > > > echo "engage af_alg_sendmsg -1" \ > > > /sys/kernel/security/killswitch/control > > > > After this, af_alg_sendmsg() returns -EPERM on every call without > > running its body. The mitigation takes effect immediately, and is dropped on > > the next reboot. > > > > A lot of recent kernel issues sit in code paths most installs only have > > enabled > > to support a relative minority of users: AF_ALG, ksmbd, nf_tables, vsock, > > ax25, > > and friends. > > > > For most users, the cost of "this socket family stops working for the day" > > is > > much smaller than the cost of running a known vulnerable kernel until the > > fix > > land. > > I like the concept - but is there any way to ensure that important functions > like malloc aren't being patched? Or some way to make sure that what is being > patched will not kill the entire kernel? > > I know this probably boils down to "operator has to use it correctly", but > just > wondering if this was considered.
I like the idea too, it should help prevent a few devops burnouts in the coming weeks. One possible approach to prevent "footgun" type of killswitch use would be to first apply a statistics collection killswitch handler that does not change the behavior: it checks whether the target function is invoked at all on the system for a given period of time. Then it applies the killswitch if it was not invoked during that period. Overall sequence: - pre-soak killswitch for e.g. 30s, checking whether the function is invoked at all. (period would be user-configurable) - if no calls were detected, engage killswitch, else report failure to the user. This should prevent footguns such as trying to killswitch fork, malloc or other core functions which are inherently required. Thanks, Mathieu -- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com

