sanitize audit_socketcall
Subsystems (3)
PATCH 2/15 sanitize audit_socketcall
* don't bother with allocations
* now that it can't fail, make it return void
Signed-off-by Al Viro <[email protected]>
--- include/linux/audit.h | 4 +- kernel/auditsc.c | 66 ++++++++++++++++++++++++++++-------------------- net/socket.c | 4 +-- 3 files changed, 41 insertions(+), 33 deletions(-)
include/linux/audit.h +2 -2
@@ -444,7 +444,7 @@ extern void audit_log_task_context(struct audit_buffer *ab);extern int __audit_ipc_obj (struct kern_ipc_perm *ipcp);extern int __audit_ipc_set_perm (unsigned long qbytes,uid_t uid,gid_t gid,mode_t mode);extern int audit_bprm (struct linux_binprm *bprm); -extern int audit_socketcall (int nargs,unsigned long *args); +extern void audit_socketcall (int nargs,unsigned long *args);extern int audit_sockaddr (int len,void *addr);extern int __audit_fd_pair (int fd1,int fd2);extern int audit_set_macxattr (const char *name);
@@ -525,7 +525,7 @@ extern int audit_signals;#define audit_ipc_obj (i) ({ 0; })#define audit_ipc_set_perm (q,u,g,m) ({ 0; })#define audit_bprm (p) ({ 0; }) -#define audit_socketcall (n,a) ({ 0; }) +#define audit_socketcall (n,a) ((void)0)#define audit_fd_pair (n,a) ({ 0; })#define audit_sockaddr (len, addr) ({ 0; })#define audit_set_macxattr (n) do { ; } while (0)
kernel/auditsc.c +38 -28
114 lines not on this page · raw message
net/socket.c +1 -3
@@ -2066,9 +2066,7 @@ asmlinkage long sys_socketcall(int call, unsigned long __user *args)if (copy_from_user (a, args, nargs[call]))return -EFAULT ; - err =audit_socketcall (nargs[call] /sizeof (unsigned long ), a); -if (err) -return err; +audit_socketcall (nargs[call] /sizeof (unsigned long ), a); a0 = a[0 ]; a1 = a[1 ];
Signature · 1 line
1.5.6.5
Quoted 5 lines · Al Viro
* don't bother with allocations
* now that it can't fail, make it return voidSigned-off-by Al Viro <[email protected]>
Reviewed-by James Morris <[email protected]>
Signature · 2 lines
James Morris <[email protected]>