Explorar o código

uvesafb/connector: Disallow unpliviged users to send netlink packets

Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Philipp Reisner %!s(int64=15) %!d(string=hai) anos
pai
achega
cc44578b5a
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  1. 3 0
      drivers/video/uvesafb.c

+ 3 - 0
drivers/video/uvesafb.c

@@ -72,6 +72,9 @@ static void uvesafb_cn_callback(struct cn_msg *msg, struct netlink_skb_parms *ns
 	struct uvesafb_task *utask;
 	struct uvesafb_ktask *task;
 
+	if (!cap_raised(nsp->eff_cap, CAP_SYS_ADMIN))
+		return;
+
 	if (msg->seq >= UVESAFB_TASKS_MAX)
 		return;