]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
net: rfkill: prevent unlimited numbers of rfkill events from being created
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 30 Mar 2026 09:14:13 +0000 (11:14 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Tue, 7 Apr 2026 10:35:04 +0000 (12:35 +0200)
commitea245d78dec594372e27d8c79616baf49e98a4a1
tree40643a7802801aef87e235be344724859220c519
parent25369b22223d1c56e42a0cd4ac9137349d5a898e
net: rfkill: prevent unlimited numbers of rfkill events from being created

Userspace can create an unlimited number of rfkill events if the system
is so configured, while not consuming them from the rfkill file
descriptor, causing a potential out of memory situation.  Prevent this
from bounding the number of pending rfkill events at a "large" number
(i.e. 1000) to prevent abuses like this.

Cc: Johannes Berg <johannes@sipsolutions.net>
Reported-by: Yuan Tan <yuantan098@gmail.com>
Reported-by: Yifan Wu <yifanwucs@gmail.com>
Reported-by: Juefei Pu <tomapufckgml@gmail.com>
Reported-by: Xin Liu <bird@lzu.edu.cn>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://patch.msgid.link/2026033013-disfigure-scroll-e25e@gregkh
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/rfkill/core.c