Thread (15 messages) 15 messages, 6 authors, 2014-07-29

Re: net: socket: NULL ptr deref in sendmsg

From: Hannes Frederic Sowa <hidden>
Date: 2014-07-25 22:15:58
Also in: lkml

On Fr, 2014-07-25 at 16:52 -0400, Sasha Levin wrote:
On 07/25/2014 11:23 AM, Andrey Ryabinin wrote:
quoted
After this report there was no usual "Unable to handle kernel NULL pointer dereference"
and this gave me a clue that address 0 is mapped and contains valid socket address structure in it.
Interesting. Does it mean that all network protocols that check it for being NULL instead of checking
the length are incorrect?
I would not like to go down this route and keep msg->msg_namelen and
msg->msg_name in sync after verify_iovec.
(such as:)

        if (msg->msg_name) {
                DECLARE_SOCKADDR(struct sockaddr_can *, addr, msg->msg_name);

                [...]
Thanks,
Hannes
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help