From: Eric Dumazet <eduma...@google.com>
Date: Mon, 14 Oct 2019 11:22:30 -0700

> tc_ctl_action() has the ability to loop forever if tcf_action_add()
> returns -EAGAIN.
> 
> This special case has been done in case a module needed to be loaded,
> but it turns out that tcf_add_notify() could also return -EAGAIN
> if the socket sk_rcvbuf limit is hit.
> 
> We need to separate the two cases, and only loop for the module
> loading case.
> 
> While we are at it, add a limit of 10 attempts since unbounded
> loops are always scary.
> 
> syzbot repro was something like :
> 
> socket(PF_NETLINK, SOCK_RAW|SOCK_NONBLOCK, NETLINK_ROUTE) = 3
> write(3, ..., 38) = 38
> setsockopt(3, SOL_SOCKET, SO_RCVBUF, [0], 4) = 0
> sendmsg(3, {msg_name(0)=NULL, msg_iov(1)=[{..., 388}], msg_controllen=0, 
> msg_flags=0x10}, ...)
 ...
> Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
> Signed-off-by: Eric Dumazet <eduma...@google.com>
> Reported-by: syzbot+cf0adbb9c28c8866c...@syzkaller.appspotmail.com

Applied and queued up for -stable, thanks.

Reply via email to