lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAF=yD-+DHDUdU2njA32eTP1MMtHwp_mTt=hSE+-wVvp0ByuWLA@mail.gmail.com>
Date:	Thu, 17 Dec 2015 10:52:02 -0500
From:	Willem de Bruijn <willemdebruijn.kernel@...il.com>
To:	Cong Wang <xiyou.wangcong@...il.com>
Cc:	Network Development <netdev@...r.kernel.org>,
	Eric Dumazet <eric.dumazet@...il.com>
Subject: Re: [Patch net] net: check both type and procotol for tcp sockets

On Thu, Dec 17, 2015 at 2:39 AM, Cong Wang <xiyou.wangcong@...il.com> wrote:
> Dmitry reported the following out-of-bound access:
>
> Call Trace:
>  [<ffffffff816cec2e>] __asan_report_load4_noabort+0x3e/0x40
> mm/kasan/report.c:294
>  [<ffffffff84affb14>] sock_setsockopt+0x1284/0x13d0 net/core/sock.c:880
>  [<     inline     >] SYSC_setsockopt net/socket.c:1746
>  [<ffffffff84aed7ee>] SyS_setsockopt+0x1fe/0x240 net/socket.c:1729
>  [<ffffffff85c18c76>] entry_SYSCALL_64_fastpath+0x16/0x7a
> arch/x86/entry/entry_64.S:185
>
> This is because we mistake a raw socket as a tcp socket.
> We should check both sk->sk_type and sk->sk_protocol to ensure
> it is a tcp socket.
>
> Willem points out __skb_complete_tx_timestamp() needs to fix as well.
>
> Reported-by: Dmitry Vyukov <dvyukov@...gle.com>
> Cc: Willem de Bruijn <willemdebruijn.kernel@...il.com>
> Cc: Eric Dumazet <eric.dumazet@...il.com>
> Signed-off-by: Cong Wang <xiyou.wangcong@...il.com>

Acked-by: Willem de Bruijn <willemb@...gle.com>

Thanks for fixing both cases at once.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ