]> git.baikalelectronics.ru Git - kernel.git/commit
netrom: fix a memory leak in nr_rx_frame()
authorCong Wang <xiyou.wangcong@gmail.com>
Thu, 27 Jun 2019 21:30:58 +0000 (14:30 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 2 Jul 2019 02:00:52 +0000 (19:00 -0700)
commitbe18cc42042cc2d53bdcce4ad037c8062213c44f
tree95b451690c50a0b20610a957cec9d64551a38c3a
parenta7c0dab988aef5ee825fb056f6646a845907519e
netrom: fix a memory leak in nr_rx_frame()

When the skb is associated with a new sock, just assigning
it to skb->sk is not sufficient, we have to set its destructor
to free the sock properly too.

Reported-by: syzbot+d6636a36d3c34bd88938@syzkaller.appspotmail.com
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/netrom/af_netrom.c