From: Steve Grubb Date: Thu, 30 Mar 2006 17:20:22 +0000 (-0500) Subject: [PATCH] sockaddr patch X-Git-Tag: v2.6.17-rc4~61^2~12 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=d6fe3945b42d09a1eca7ad180a1646e585b8594f;p=linux-2.6-omap-h63xx.git [PATCH] sockaddr patch On Thursday 23 March 2006 09:08, John D. Ramsdell wrote: > I noticed that a socketcall(bind) and socketcall(connect) event contain a > record of type=SOCKADDR, but I cannot see one for a system call event > associated with socketcall(accept). Recording the sockaddr of an accepted > socket is important for cross platform information flow analys Thanks for pointing this out. The following patch should address this. Signed-off-by: Steve Grubb Signed-off-by: Al Viro --- diff --git a/net/socket.c b/net/socket.c index 0ce12dfc7a7..02948b622bd 100644 --- a/net/socket.c +++ b/net/socket.c @@ -267,6 +267,8 @@ int move_addr_to_user(void *kaddr, int klen, void __user *uaddr, int __user *ule return -EINVAL; if(len) { + if (audit_sockaddr(klen, kaddr)) + return -ENOMEM; if(copy_to_user(uaddr,kaddr,len)) return -EFAULT; }