Cong Wang 8621436671 smc: disallow TCP_ULP in smc_setsockopt()
syzbot is able to setup kTLS on an SMC socket which coincidentally
uses sk_user_data too. Later, kTLS treats it as psock so triggers a
refcnt warning. The root cause is that smc_setsockopt() simply calls
TCP setsockopt() which includes TCP_ULP. I do not think it makes
sense to setup kTLS on top of SMC sockets, so we should just disallow
this setup.

It is hard to find a commit to blame, but we can apply this patch
since the beginning of TCP_ULP.

Reported-and-tested-by: syzbot+b54a1ce86ba4a623b7f0@syzkaller.appspotmail.com
Fixes: 734942cc4ea6 ("tcp: ULP infrastructure")
Cc: John Fastabend <john.fastabend@gmail.com>
Signed-off-by: Karsten Graul <kgraul@linux.ibm.com>
Signed-off-by: Cong Wang <cong.wang@bytedance.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2021-05-05 12:52:45 -07:00
..
2021-03-30 16:54:50 -07:00
2021-04-29 11:57:23 -07:00
2021-03-26 20:41:52 -07:00
2021-03-25 17:05:07 -07:00
2021-04-29 11:57:23 -07:00
2021-04-09 16:34:56 -07:00
2021-03-28 17:31:13 -07:00
2021-04-29 11:57:23 -07:00
2021-04-29 11:57:23 -07:00
2021-04-29 11:57:23 -07:00
2021-04-29 11:57:23 -07:00
2021-04-29 11:57:23 -07:00
2021-04-29 11:57:23 -07:00
2021-03-28 17:31:13 -07:00
2021-03-25 16:56:27 -07:00