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

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

Comments

Steve Conklin - April 25, 2012, 7:51 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 293a16c53e986d60a0801799c1e7058baf75f92d 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)
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 5d5f64b..1d0010b 100644
--- a/security/commoncap.c
+++ b/security/commoncap.c
@@ -28,6 +28,7 @@ 
 #include <linux/prctl.h>
 #include <linux/securebits.h>
 #include <linux/syslog.h>
+#include <linux/personality.h>

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