Skip to content

Commit 6d208da

Browse files
pcmooreAl Viro
authored andcommitted
audit: Fix possible return value truncation in audit_get_context()
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> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
1 parent 55ad2f8 commit 6d208da

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel/auditsc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -752,7 +752,7 @@ static void audit_set_auditable(struct audit_context *ctx)
752752

753753
static inline struct audit_context *audit_get_context(struct task_struct *tsk,
754754
int return_valid,
755-
int return_code)
755+
long return_code)
756756
{
757757
struct audit_context *context = tsk->audit_context;
758758

0 commit comments

Comments
 (0)