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]
Date:   Mon, 24 Jun 2019 10:33:08 +0200
From:   Eric Dumazet <eric.dumazet@...il.com>
To:     Xin Long <lucien.xin@...il.com>,
        network dev <netdev@...r.kernel.org>
Cc:     davem@...emloft.net, Jon Maloy <jon.maloy@...csson.com>,
        Ying Xue <ying.xue@...driver.com>,
        tipc-discussion@...ts.sourceforge.net,
        syzkaller-bugs@...glegroups.com
Subject: Re: [PATCH net] tipc: check msg->req data len in
 tipc_nl_compat_bearer_disable



On 6/24/19 12:59 AM, Xin Long wrote:
> This patch is to fix an uninit-value issue, reported by syzbot:
> 
>   BUG: KMSAN: uninit-value in memchr+0xce/0x110 lib/string.c:981
>   Call Trace:
>     __dump_stack lib/dump_stack.c:77 [inline]
>     dump_stack+0x191/0x1f0 lib/dump_stack.c:113
>     kmsan_report+0x130/0x2a0 mm/kmsan/kmsan.c:622
>     __msan_warning+0x75/0xe0 mm/kmsan/kmsan_instr.c:310
>     memchr+0xce/0x110 lib/string.c:981
>     string_is_valid net/tipc/netlink_compat.c:176 [inline]
>     tipc_nl_compat_bearer_disable+0x2a1/0x480 net/tipc/netlink_compat.c:449
>     __tipc_nl_compat_doit net/tipc/netlink_compat.c:327 [inline]
>     tipc_nl_compat_doit+0x3ac/0xb00 net/tipc/netlink_compat.c:360
>     tipc_nl_compat_handle net/tipc/netlink_compat.c:1178 [inline]
>     tipc_nl_compat_recv+0x1b1b/0x27b0 net/tipc/netlink_compat.c:1281
> 
> TLV_GET_DATA_LEN() may return a negtive int value, which will be
> used as size_t (becoming a big unsigned long) passed into memchr,
> cause this issue.
> 
> Similar to what it does in tipc_nl_compat_bearer_enable(), this
> fix is to return -EINVAL when TLV_GET_DATA_LEN() is negtive in
> tipc_nl_compat_bearer_disable(), as well as in
> tipc_nl_compat_link_stat_dump() and tipc_nl_compat_link_reset_stats().
> 
> Reported-by: syzbot+30eaa8bf392f7fafffaf@...kaller.appspotmail.com
> Signed-off-by: Xin Long <lucien.xin@...il.com>

Please add an appropriate Fixes: tag, thanks !

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ