* [RFC PATCH] audit: Fix possible return value truncation in audit_get_context()
@ 2009-04-01 19:47 Paul Moore
2009-04-01 21:19 ` Alexander Viro
0 siblings, 1 reply; 2+ messages in thread
From: Paul Moore @ 2009-04-01 19:47 UTC (permalink / raw)
To: linux-audit
The audit subsystem treats syscall return codes as type long, unfortunately
the audit_get_context() function mistakenly converts the return code to an
int type in the parameters which could cause problems on systems where the
sizeof(int) != sizeof(long).
Signed-off-by: Paul Moore <paul.moore@hp.com>
---
kernel/auditsc.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/kernel/auditsc.c b/kernel/auditsc.c
index 8cbddff..8d76dfc 100644
--- a/kernel/auditsc.c
+++ b/kernel/auditsc.c
@@ -751,7 +751,7 @@ static void audit_set_auditable(struct audit_context *ctx)
static inline struct audit_context *audit_get_context(struct task_struct *tsk,
int return_valid,
- int return_code)
+ long return_code)
{
struct audit_context *context = tsk->audit_context;
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [RFC PATCH] audit: Fix possible return value truncation in audit_get_context()
2009-04-01 19:47 [RFC PATCH] audit: Fix possible return value truncation in audit_get_context() Paul Moore
@ 2009-04-01 21:19 ` Alexander Viro
0 siblings, 0 replies; 2+ messages in thread
From: Alexander Viro @ 2009-04-01 21:19 UTC (permalink / raw)
To: Paul Moore; +Cc: linux-audit
On Wed, Apr 01, 2009 at 03:47:27PM -0400, Paul Moore wrote:
> The audit subsystem treats syscall return codes as type long, unfortunately
> the audit_get_context() function mistakenly converts the return code to an
> int type in the parameters which could cause problems on systems where the
> sizeof(int) != sizeof(long).
>
> Signed-off-by: Paul Moore <paul.moore@hp.com>
Applied. E.g. for mmap() it's actually easy to trigger on 64bit boxen.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-04-01 21:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-04-01 19:47 [RFC PATCH] audit: Fix possible return value truncation in audit_get_context() Paul Moore
2009-04-01 21:19 ` Alexander Viro
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.