Linux Kernel Introducing New Taint Due To Fuzzing Bots Yielding Impractical Bug Reports

Linux Kernel Introducing New Taint Due To Fuzzing Bots Yielding Impractical Bug Reports

The Linux kernel is having to introduce a new taint flag "TAINT_FORCED_BIND" to deal with fuzzing bots like Syzbot abusing Linux's bind/unbind sysfs functionality and generating bug reports for impractical and not at all relevant hardware/driver combinations. Linux's bind and unbind sysfs attributes allow unbinding a device from a certain kernel driver at run-time and similarly for binding arbitrary devices based on their bus ID to a given driver. There are practical cases for using bind/unbind for hardware resets, passing devices to a VM, and more. But with the Linux sysfs bind allowing arbitrary devices to be bound to different kernel drivers is yielding bug reports from fuzzing tools / bots that aren't at all relevant to any actual intended use-case. Greg Kroah-Hartman as a result is introducing the TAINT_FORCED_BIND to taint the running Linux kernel if the bind/unbind sysfs files are ever written to for a driver. Thus it's a clear indicator for any bug reports to know that bind/unbind were used and not some normal workflow. Greg confirmed the motivation for TAINT_FORCED_BIND being due to the fuzzing bots and the like causing a problematic and impractical reporting mess: "The ability to add and remove devices from a driver through the sysfs "bind" and "unbind" files was created all those decades ago as a way that kernel developers can iterate faster, and provide a debugging way for users to attempt to add a new device to a driver without having to rebuild their kernel. This api over the years has been abused and recently come under a major fuzzing "attack" through tools like syzbot which decided that it would attempt to just randomly bind any driver to any type of device, causing loads of unneeded errors and pointless kernel patches to be generated by unsuspecting new developers." Tools can also then leverage panic_on_taint to yield a kernel panic as soon as their kernel becomes tainted by such action in order to stop proceeding with useless testing combinations. This patch introducing TAINT_FORCED_BIND was queued into Greg's driver-core-next Git branch and thus is expected to be submitted for the upcoming Linux 7.4 kernel cycle.

Original Source

Read the full article at Phoronix →

KhanList aggregates and links to publicly available news content. We do not host full articles from third-party sources. Always verify important information with original sources.