rpms/kernel/F-8 linux-2.6-selinux-ebitmap-loop-bug.patch, NONE, 1.1 kernel.spec, 1.258, 1.259

Eric Paris (eparis) fedora-extras-commits at redhat.com
Fri Nov 9 15:31:13 UTC 2007


Author: eparis

Update of /cvs/pkgs/rpms/kernel/F-8
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv1025

Modified Files:
	kernel.spec 
Added Files:
	linux-2.6-selinux-ebitmap-loop-bug.patch 
Log Message:
* Fri Nov  9 2007 Eric Paris <eparis at redhat.com>
- Fix loop iteration problem in selinux ebitmap code


linux-2.6-selinux-ebitmap-loop-bug.patch:

--- NEW FILE linux-2.6-selinux-ebitmap-loop-bug.patch ---
From: KaiGai Kohei <kaigai at kaigai.gr.jp>
Date: Tue, 6 Nov 2007 16:17:16 +0000 (+0900)
Subject: SELinux: fix bug in new ebitmap code.
X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Fjmorris%2Fselinux-2.6.git;a=commitdiff_plain;h=6d2b685564ba417f4c6d80c3661f0dfee13fff85

SELinux: fix bug in new ebitmap code.

The "e_iter = e_iter->next;" statement in the inner for loop is primally
bug.  It should be moved to outside of the for loop.

Signed-off-by: KaiGai Kohei <kaigai at kaigai.gr.jp>
Acked-by:  Stephen Smalley <sds at tycho.nsa.gov>
Signed-off-by: James Morris <jmorris at namei.org>
---

diff --git a/security/selinux/ss/ebitmap.c b/security/selinux/ss/ebitmap.c
index c1a6b22..920b5e3 100644
--- a/security/selinux/ss/ebitmap.c
+++ b/security/selinux/ss/ebitmap.c
@@ -129,8 +129,8 @@ int ebitmap_netlbl_export(struct ebitmap *ebmap,
 			cmap_sft = delta % NETLBL_CATMAP_MAPSIZE;
 			c_iter->bitmap[cmap_idx]
 				|= e_iter->maps[cmap_idx] << cmap_sft;
-			e_iter = e_iter->next;
 		}
+		e_iter = e_iter->next;
 	}
 
 	return 0;


Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-8/kernel.spec,v
retrieving revision 1.258
retrieving revision 1.259
diff -u -r1.258 -r1.259
--- kernel.spec	8 Nov 2007 22:06:15 -0000	1.258
+++ kernel.spec	9 Nov 2007 15:30:29 -0000	1.259
@@ -738,6 +738,7 @@
 Patch2201: linux-2.6-selinux-ebitmap-for-avc-miss.patch
 Patch2202: linux-2.6-selinux-ebitmap-for-avc-miss-cleanup.patch
 Patch2203: linux-2.6-selinux-sigchld-wait.patch
+Patch2204: linux-2.6-selinux-ebitmap-loop-bug.patch
 # cputime accounting is broken, fix is in 2.6.24
 Patch2220: linux-2.6-sched-keep-stime-monotonic.patch
 Patch2221: linux-2.6-sched-keep-utime-monotonic.patch
@@ -1365,6 +1366,7 @@
 ApplyPatch linux-2.6-selinux-ebitmap-for-avc-miss.patch
 ApplyPatch linux-2.6-selinux-ebitmap-for-avc-miss-cleanup.patch
 ApplyPatch linux-2.6-selinux-sigchld-wait.patch
+ApplyPatch linux-2.6-selinux-ebitmap-loop-bug.patch
 
 # cputime accounting fix, fixes "task using 9999% of CPU"
 ApplyPatch linux-2.6-sched-keep-utime-monotonic.patch
@@ -1966,6 +1968,9 @@
 
 
 %changelog
+* Fri Nov  9 2007 Eric Paris <eparis at redhat.com>
+- Fix loop iteration problem in selinux ebitmap code
+
 * Thu Nov  8 2007 John W. Linville <linville at redhat.com>
 - Resync wireless bits from current upstream
 




More information about the fedora-extras-commits mailing list