diff options
author | Philipp Reisner <philipp.reisner@linbit.com> | 2009-10-13 11:28:18 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-10-22 15:11:56 -0700 |
commit | 127f1bdba584bc2aa2f910273b6b5701d5bad3ed (patch) | |
tree | 5b01469ab62faa07feb21008b9df35a5c587d0d6 | |
parent | 85a79fc56eaee6587d19971b5348261773c1c507 (diff) | |
download | lwn-127f1bdba584bc2aa2f910273b6b5701d5bad3ed.tar.gz lwn-127f1bdba584bc2aa2f910273b6b5701d5bad3ed.zip |
uvesafb/connector: Disallow unpliviged users to send netlink packets
(cherry picked from commit 30efa3f76813b17445bc5a2e443ae9731518566b)
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | drivers/video/uvesafb.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/video/uvesafb.c b/drivers/video/uvesafb.c index aa7cd959cced..e35232a18571 100644 --- a/drivers/video/uvesafb.c +++ b/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; |