Null dereference in socket.c

3 messages, 3 authors, 2007-09-28 · open the first message on its own page

Null dereference in socket.c

From: Chuck Ebbert <hidden>
Date: 2007-09-28 22:58:39

After debugging an oops (https://bugzilla.redhat.com/attachment.cgi?id=209231)
I find it happens here in socket.c::sock_ioctl() line 902:

               default:
=============>          err = sock->ops->ioctl(sock, cmd, arg);

                        /*
                         * If this ioctl is unknown try to hand it down
                         * to the NIC driver.
                         */
                        if (err == -ENOIOCTLCMD)
                                err = dev_ioctl(cmd, argp);
                        break;


ioctl is NULL and the kernel jumps to address 0. Should we add a check
for that?

Bug report:
https://bugzilla.redhat.com/show_bug.cgi?id=306801

Re: Null dereference in socket.c

From: David Miller <davem@davemloft.net>
Date: 2007-09-28 23:00:57

From: Chuck Ebbert <redacted>
Date: Fri, 28 Sep 2007 18:58:36 -0400
After debugging an oops (https://bugzilla.redhat.com/attachment.cgi?id=209231)
I find it happens here in socket.c::sock_ioctl() line 902:

               default:
=============>          err = sock->ops->ioctl(sock, cmd, arg);

                        /*
                         * If this ioctl is unknown try to hand it down
                         * to the NIC driver.
                         */
                        if (err == -ENOIOCTLCMD)
                                err = dev_ioctl(cmd, argp);
                        break;


ioctl is NULL and the kernel jumps to address 0. Should we add a check
for that?

Bug report:
https://bugzilla.redhat.com/show_bug.cgi?id=306801
Every protocol should provide a non-NULL ->ioctl() method,
find out which one isn't and fix it.

Re: Null dereference in socket.c

From: Stephen Hemminger <hidden>
Date: 2007-09-28 23:42:53

On Fri, 28 Sep 2007 16:00:57 -0700 (PDT)
David Miller [off-list ref] wrote:
From: Chuck Ebbert <redacted>
Date: Fri, 28 Sep 2007 18:58:36 -0400
quoted
After debugging an oops (https://bugzilla.redhat.com/attachment.cgi?id=209231)
I find it happens here in socket.c::sock_ioctl() line 902:

               default:
=============>          err = sock->ops->ioctl(sock, cmd, arg);

                        /*
                         * If this ioctl is unknown try to hand it down
                         * to the NIC driver.
                         */
                        if (err == -ENOIOCTLCMD)
                                err = dev_ioctl(cmd, argp);
                        break;


ioctl is NULL and the kernel jumps to address 0. Should we add a check
for that?

Bug report:
https://bugzilla.redhat.com/show_bug.cgi?id=306801
Every protocol should provide a non-NULL ->ioctl() method,
find out which one isn't and fix it
Auditing the net-2.6.24 tree all instances found by cscope are safe.

	


-- 
Stephen Hemminger [off-list ref]
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help