[merged] samples-seccomp-improve-label-helper.patch removed from -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     Subject: samples/seccomp: improve label helper
has been removed from the -mm tree.  Its filename was
     samples-seccomp-improve-label-helper.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
From: Kees Cook <keescook@xxxxxxxxxxxx>
Subject: samples/seccomp: improve label helper

Fixes a potential corruption with uninitialized stack memory in the
seccomp BPF sample program.

[akpm@xxxxxxxxxxxxxxxxxxxx: coding-style fixlet]
Signed-off-by: Kees Cook <keescook@xxxxxxxxxxxx>
Reported-by: Robert Swiecki <swiecki@xxxxxxxxxx>
Tested-by: Robert Swiecki <swiecki@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 samples/seccomp/bpf-fancy.c  |    4 +++-
 samples/seccomp/bpf-helper.c |    6 ++++++
 2 files changed, 9 insertions(+), 1 deletion(-)

diff -puN samples/seccomp/bpf-fancy.c~samples-seccomp-improve-label-helper samples/seccomp/bpf-fancy.c
--- a/samples/seccomp/bpf-fancy.c~samples-seccomp-improve-label-helper
+++ a/samples/seccomp/bpf-fancy.c
@@ -25,7 +25,9 @@
 
 int main(int argc, char **argv)
 {
-	struct bpf_labels l;
+	struct bpf_labels l = {
+		.count = 0,
+	};
 	static const char msg1[] = "Please type something: ";
 	static const char msg2[] = "You typed: ";
 	char buf[256];
diff -puN samples/seccomp/bpf-helper.c~samples-seccomp-improve-label-helper samples/seccomp/bpf-helper.c
--- a/samples/seccomp/bpf-helper.c~samples-seccomp-improve-label-helper
+++ a/samples/seccomp/bpf-helper.c
@@ -10,6 +10,7 @@
  */
 
 #include <stdio.h>
+#include <stdlib.h>
 #include <string.h>
 
 #include "bpf-helper.h"
@@ -63,6 +64,11 @@ __u32 seccomp_bpf_label(struct bpf_label
 {
 	struct __bpf_label *begin = labels->labels, *end;
 	int id;
+
+	if (labels->count == BPF_LABELS_MAX) {
+		fprintf(stderr, "Too many labels\n");
+		exit(1);
+	}
 	if (labels->count == 0) {
 		begin->label = label;
 		begin->location = 0xffffffff;
_

Patches currently in -mm which might be from keescook@xxxxxxxxxxxx are

origin.patch
aslr-fix-stack-randomization-on-64-bit-systems.patch
lib-vsprintf-add-%pt-format-specifier.patch
linux-next.patch

--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux