All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] capabilities: fix sys_prctl() returned uninitialized value
@ 2008-05-21  9:37 Shi Weihua
  2008-05-21 12:38 ` Serge E. Hallyn
  0 siblings, 1 reply; 3+ messages in thread
From: Shi Weihua @ 2008-05-21  9:37 UTC (permalink / raw)
  To: Andrew Morton; +Cc: morgan, linux-security-module, LKML, serue, jmorris

When we test kernel by the latest LTP(20080430) on ia64,
the following failure occured:
-------------------------------------
prctl01     1  PASS  :  Test Passed
prctl01     0  WARN  :  prctl() returned 2048 errno = 0 : Success
prctl01     1  PASS  :  Test Passed
prctl01     2  FAIL  :  Test Failed
-------------------------------------

We found commit 3898b1b4ebff8dcfbcf1807e0661585e06c9a91c
causes this failure by git-bisect.
And, we found *rc_p has not been initialized if switch-default 
of the function cap_task_prctl()(security/commoncap.c). When *rc_p
uninitialized, sys_prctl() will return a wrong value.

Signed-off-by: Shi Weihua <shiwh@cn.fujitsu.com> 
---
diff --git a/security/commoncap.c b/security/commoncap.c
index 5edabc7..a4b28c8 100644
--- a/security/commoncap.c
+++ b/security/commoncap.c
@@ -649,6 +649,7 @@ int cap_task_prctl(int option, unsigned long arg2, unsigned long arg3,
 
 	default:
 		/* No functionality available - continue with default */
+		*rc_p = 0;
 		return 0;
 	}
 





^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-05-22  1:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-21  9:37 [PATCH] capabilities: fix sys_prctl() returned uninitialized value Shi Weihua
2008-05-21 12:38 ` Serge E. Hallyn
2008-05-22  0:58   ` Shi Weihua

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.