Patchwork [CVE-2012-2123] natty security: fix compile error in commoncap.c

login
register
mail settings
Submitter Steve Conklin
Date April 25, 2012, 7:52 p.m.
Message ID <4F98561A.8030708@canonical.com>
Download mbox | patch
Permalink /patch/155088/
State New
Headers show

Comments

Steve Conklin - April 25, 2012, 7:52 p.m.
This is a backport from upstream, Serge pointed out that the earlier CVE
patch causes a failure to build on some architectures, but I didn't run
into it in my testing. This patch should be applied after the previous
one for CVE-2012-2123.

From 31d0888fc648d4a5a54b676570cbe9b65bcfcf4b Mon Sep 17 00:00:00 2001
From: Jonghwan Choi <jhbird.choi@samsung.com>
Date: Wed, 18 Apr 2012 17:23:04 -0400
Subject: [PATCH] security: fix compile error in commoncap.c

CVE-2012-2123

BugLink: http://bugs.launchpad.net/bugs/987571

Add missing "personality.h"
security/commoncap.c: In function 'cap_bprm_set_creds':
security/commoncap.c:510: error: 'PER_CLEAR_ON_SETID' undeclared (first
use in this function)
security/commoncap.c:510: error: (Each undeclared identifier is reported
only once
security/commoncap.c:510: error: for each function it appears in.)

Signed-off-by: Jonghwan Choi <jhbird.choi@samsung.com>
Acked-by: Serge Hallyn <serge.hallyn@canonical.com>
Signed-off-by: James Morris <james.l.morris@oracle.com>
(cherry picked from commit 51b79bee627d52 with adjustment)
Signed-off-by: Steve Conklin <sconklin@canonical.com>
---
 security/commoncap.c |    1 +
 1 file changed, 1 insertion(+)
Tim Gardner - April 25, 2012, 8:03 p.m.

Patch

diff --git a/security/commoncap.c b/security/commoncap.c
index 0acd490..7f239ff 100644
--- a/security/commoncap.c
+++ b/security/commoncap.c
@@ -27,6 +27,7 @@ 
 #include <linux/sched.h>
 #include <linux/prctl.h>
 #include <linux/securebits.h>
+#include <linux/personality.h>

 /*
  * If a non-root user executes a setuid-root binary in