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

mail settings
Submitter Steve Conklin
Date April 25, 2012, 7:52 p.m.
Message ID <>
Download mbox | patch
Permalink /patch/155088/
State New
Headers show


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 <>
Date: Wed, 18 Apr 2012 17:23:04 -0400
Subject: [PATCH] security: fix compile error in commoncap.c



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 <>
Acked-by: Serge Hallyn <>
Signed-off-by: James Morris <>
(cherry picked from commit 51b79bee627d52 with adjustment)
Signed-off-by: Steve Conklin <>
 security/commoncap.c |    1 +
 1 file changed, 1 insertion(+)
Tim Gardner - April 25, 2012, 8:03 p.m.


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