]> git.pld-linux.org Git - packages/kernel.git/blobdiff - kernel-small_fixes.patch
- 4.9.135
[packages/kernel.git] / kernel-small_fixes.patch
index 5c9ff24b1b0f50dc54988023210ad336a9bb7890..319191ce2821f2eacb3c4fdd4b50d92f33d2f795 100644 (file)
                                exit
                        fi
                done
-From 8358b02bf67d3a5d8a825070e1aa73f25fb2e4c7 Mon Sep 17 00:00:00 2001
-From: Jann Horn <jannh@google.com>
-Date: Tue, 26 Apr 2016 22:26:26 +0200
-Subject: bpf: fix double-fdput in replace_map_fd_with_map_ptr()
+From 5d12f71723762a39435d054d02bbf5fb87c5cd14 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Arkadiusz=20Mi=C5=9Bkiewicz?= <arekm@maven.pl>
+Date: Mon, 6 Feb 2017 14:45:15 +0100
+Subject: [PATCH] mac80211: Print text for disassociation reason
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
 
-When bpf(BPF_PROG_LOAD, ...) was invoked with a BPF program whose bytecode
-references a non-map file descriptor as a map file descriptor, the error
-handling code called fdput() twice instead of once (in __bpf_map_get() and
-in replace_map_fd_with_map_ptr()). If the file descriptor table of the
-current task is shared, this causes f_count to be decremented too much,
-allowing the struct file to be freed while it is still in use
-(use-after-free). This can be exploited to gain root privileges by an
-unprivileged user.
+When disassociation happens only numeric reason is printed
+in ieee80211_rx_mgmt_disassoc(). Add text variant, too.
 
-This bug was introduced in
-commit 0246e64d9a5f ("bpf: handle pseudo BPF_LD_IMM64 insn"), but is only
-exploitable since
-commit 1be7f75d1668 ("bpf: enable non-root eBPF programs") because
-previously, CAP_SYS_ADMIN was required to reach the vulnerable code.
-
-(posted publicly according to request by maintainer)
-
-Signed-off-by: Jann Horn <jannh@google.com>
-Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-Acked-by: Alexei Starovoitov <ast@kernel.org>
-Acked-by: Daniel Borkmann <daniel@iogearbox.net>
-Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Arkadiusz Miƛkiewicz <arekm@maven.pl>
 ---
kernel/bpf/verifier.c | 1 -
- 1 file changed, 1 deletion(-)
net/mac80211/mlme.c | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
 
-diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c
-index 618ef77..db2574e 100644
---- a/kernel/bpf/verifier.c
-+++ b/kernel/bpf/verifier.c
-@@ -2030,7 +2030,6 @@ static int replace_map_fd_with_map_ptr(struct verifier_env *env)
-                       if (IS_ERR(map)) {
-                               verbose("fd %d is not pointing to valid bpf_map\n",
-                                       insn->imm);
--                              fdput(f);
-                               return PTR_ERR(map);
-                       }
+diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
+index 098ce9b179ee..fcf8d0aa66ec 100644
+--- a/net/mac80211/mlme.c
++++ b/net/mac80211/mlme.c
+@@ -2801,8 +2801,9 @@ static void ieee80211_rx_mgmt_disassoc(struct ieee80211_sub_if_data *sdata,
+       reason_code = le16_to_cpu(mgmt->u.disassoc.reason_code);
+-      sdata_info(sdata, "disassociated from %pM (Reason: %u)\n",
+-                 mgmt->sa, reason_code);
++      sdata_info(sdata, "disassociated from %pM (Reason: %u=%s)\n",
++                 mgmt->sa, reason_code,
++                 ieee80211_get_reason_code_string(reason_code));
+       ieee80211_set_disassoc(sdata, 0, 0, false, NULL);
  
 -- 
-cgit v0.12
+2.11.0
 
This page took 0.02779 seconds and 4 git commands to generate.