[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20200816.210404.1864176276185744630.davem@davemloft.net>
Date: Sun, 16 Aug 2020 21:04:04 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: xiyou.wangcong@...il.com
Cc: netdev@...r.kernel.org,
syzbot+0e7181deafa7e0b79923@...kaller.appspotmail.com,
jmaloy@...hat.com, ying.xue@...driver.com,
richard.alpe@...csson.com
Subject: Re: [Patch net] tipc: fix uninit skb->data in
tipc_nl_compat_dumpit()
From: Cong Wang <xiyou.wangcong@...il.com>
Date: Sat, 15 Aug 2020 16:29:15 -0700
> __tipc_nl_compat_dumpit() has two callers, and it expects them to
> pass a valid nlmsghdr via arg->data. This header is artificial and
> crafted just for __tipc_nl_compat_dumpit().
>
> tipc_nl_compat_publ_dump() does so by putting a genlmsghdr as well
> as some nested attribute, TIPC_NLA_SOCK. But the other caller
> tipc_nl_compat_dumpit() does not, this leaves arg->data uninitialized
> on this call path.
>
> Fix this by just adding a similar nlmsghdr without any payload in
> tipc_nl_compat_dumpit().
>
> This bug exists since day 1, but the recent commit 6ea67769ff33
> ("net: tipc: prepare attrs in __tipc_nl_compat_dumpit()") makes it
> easier to appear.
>
> Reported-and-tested-by: syzbot+0e7181deafa7e0b79923@...kaller.appspotmail.com
> Fixes: d0796d1ef63d ("tipc: convert legacy nl bearer dump to nl compat")
> Cc: Jon Maloy <jmaloy@...hat.com>
> Cc: Ying Xue <ying.xue@...driver.com>
> Cc: Richard Alpe <richard.alpe@...csson.com>
> Signed-off-by: Cong Wang <xiyou.wangcong@...il.com>
Applied and queued up for -stable, thanks.
Powered by blists - more mailing lists