Bugzilla – Attachment 26889 Details for
Bug 63895
VUL-0: CVE-2004-1137: kernel: bug in IGMP code
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
IDP Log In
|
Forgot Password
[patch]
signedness-compat.patch
signedness-compat.patch (text/plain), 1.38 KB, created by
Marcus Meissner
on 2004-12-09 17:43:44 UTC
(
hide
)
Description:
signedness-compat.patch
Filename:
MIME Type:
Creator:
Marcus Meissner
Created:
2004-12-09 17:43:44 UTC
Size:
1.38 KB
patch
obsolete
># This is a BitKeeper generated diff -Nru style patch. ># ># ChangeSet ># 2004/12/08 13:03:03-08:00 davem@nuts.davemloft.net ># [NET]: CMSG compat code needs signedness fixes too. ># ># Signed-off-by: David S. Miller <davem@davemloft.net> ># ># net/compat.c ># 2004/12/08 13:02:32-08:00 davem@nuts.davemloft.net +7 -5 ># [NET]: CMSG compat code needs signedness fixes too. ># >diff -Nru a/net/compat.c b/net/compat.c >--- a/net/compat.c 2004-12-09 01:43:18 -08:00 >+++ b/net/compat.c 2004-12-09 01:43:18 -08:00 >@@ -124,6 +124,12 @@ > (struct compat_cmsghdr __user *)((msg)->msg_control) : \ > (struct compat_cmsghdr __user *)NULL) > >+#define CMSG_COMPAT_OK(ucmlen, ucmsg, mhdr) \ >+ ((ucmlen) >= sizeof(struct cmsghdr) && \ >+ (ucmlen) <= (unsigned long) \ >+ ((mhdr)->msg_controllen - \ >+ ((char *)(ucmsg) - (char *)(mhdr)->msg_control))) >+ > static inline struct compat_cmsghdr __user *cmsg_compat_nxthdr(struct msghdr *msg, > struct compat_cmsghdr __user *cmsg, int cmsg_len) > { >@@ -154,11 +160,7 @@ > return -EFAULT; > > /* Catch bogons. */ >- if(CMSG_COMPAT_ALIGN(ucmlen) < >- CMSG_COMPAT_ALIGN(sizeof(struct compat_cmsghdr))) >- return -EINVAL; >- if((unsigned long)(((char __user *)ucmsg - (char __user *)kmsg->msg_control) >- + ucmlen) > kmsg->msg_controllen) >+ if (!CMSG_COMPAT_OK(ucmlen, ucmsg, kmsg)) > return -EINVAL; > > tmp = ((ucmlen - CMSG_COMPAT_ALIGN(sizeof(*ucmsg))) +
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
Actions:
View
|
Diff
Attachments on
bug 63895
:
26775
|
26806
|
26889
|
26996
|
27005
|
27011