Stanislav Fomichev
e387a25552
ppp: associate skb with a device at tx
[ Upstream commit 9f22544446 ]
Syzkaller triggered flow dissector warning with the following:
r0 = openat$ppp(0xffffffffffffff9c, &(0x7f0000000000), 0xc0802, 0x0)
ioctl$PPPIOCNEWUNIT(r0, 0xc004743e, &(0x7f00000000c0))
ioctl$PPPIOCSACTIVE(r0, 0x40107446, &(0x7f0000000240)={0x2, &(0x7f0000000180)=[{0x20, 0x0, 0x0, 0xfffff034}, {0x6}]})
pwritev(r0, &(0x7f0000000040)=[{&(0x7f0000000140)='\x00!', 0x2}], 0x1, 0x0, 0x0)
[ 9.485814] WARNING: CPU: 3 PID: 329 at net/core/flow_dissector.c:1016 __skb_flow_dissect+0x1ee0/0x1fa0
[ 9.485929] skb_get_poff+0x53/0xa0
[ 9.485937] bpf_skb_get_pay_offset+0xe/0x20
[ 9.485944] ? ppp_send_frame+0xc2/0x5b0
[ 9.485949] ? _raw_spin_unlock_irqrestore+0x40/0x60
[ 9.485958] ? __ppp_xmit_process+0x7a/0xe0
[ 9.485968] ? ppp_xmit_process+0x5b/0xb0
[ 9.485974] ? ppp_write+0x12a/0x190
[ 9.485981] ? do_iter_write+0x18e/0x2d0
[ 9.485987] ? __import_iovec+0x30/0x130
[ 9.485997] ? do_pwritev+0x1b6/0x240
[ 9.486016] ? trace_hardirqs_on+0x47/0x50
[ 9.486023] ? __x64_sys_pwritev+0x24/0x30
[ 9.486026] ? do_syscall_64+0x3d/0x80
[ 9.486031] ? entry_SYSCALL_64_after_hwframe+0x63/0xcd
Flow dissector tries to find skb net namespace either via device
or via socket. Neigher is set in ppp_send_frame, so let's manually
use ppp->dev.
Cc: Paul Mackerras <paulus@samba.org>
Cc: linux-ppp@vger.kernel.org
Reported-by: syzbot+41cab52ab62ee99ed24a@syzkaller.appspotmail.com
Signed-off-by: Stanislav Fomichev <sdf@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-01-07 12:07:32 +01:00
..
2023-01-07 12:07:31 +01:00
2021-11-12 13:18:01 +01:00
2021-12-14 10:04:48 +01:00
2022-11-10 15:46:05 +01:00
2022-08-25 11:09:29 +02:00
2021-11-26 11:48:38 +01:00
2022-09-15 12:39:46 +02:00
2021-09-22 11:43:02 +02:00
2022-09-05 10:23:56 +02:00
2023-01-07 12:07:22 +01:00
2022-12-08 11:15:39 +01:00
2021-05-26 11:29:07 +02:00
2023-01-07 12:07:31 +01:00
2023-01-07 12:07:17 +01:00
2022-06-14 16:52:40 +02:00
2022-07-21 20:40:31 +02:00
2023-01-07 12:07:13 +01:00
2023-01-07 12:07:24 +01:00
2023-01-07 12:07:24 +01:00
2022-11-25 17:35:38 +01:00
2022-02-23 11:56:41 +01:00
2021-07-20 16:21:05 +02:00
2022-05-12 12:14:57 +02:00
2022-10-26 13:15:43 +02:00
2022-12-14 11:24:33 +01:00
2023-01-07 12:07:32 +01:00
2023-01-07 12:07:17 +01:00
2023-01-07 12:07:27 +01:00
2022-09-28 10:55:47 +02:00
2022-12-08 11:15:41 +01:00
2022-04-20 09:06:28 +02:00
2023-01-07 12:07:26 +01:00
2022-12-08 11:15:40 +01:00
2023-01-07 12:07:24 +01:00
2023-01-07 12:07:17 +01:00
2023-01-07 12:07:28 +01:00
2021-10-06 10:23:42 +02:00
2023-01-07 12:07:14 +01:00
2023-01-07 12:07:29 +01:00
2021-07-20 16:21:05 +02:00
2022-05-12 12:14:53 +02:00
2023-01-07 12:07:28 +01:00
2023-01-07 12:07:26 +01:00
2023-01-07 12:07:32 +01:00
2023-01-07 12:07:20 +01:00
2022-10-26 13:15:40 +02:00
2021-11-26 11:48:34 +01:00
2022-10-26 13:15:44 +02:00
2023-01-07 12:07:25 +01:00
2023-01-07 12:07:20 +01:00
2023-01-07 12:07:17 +01:00
2023-01-07 12:07:32 +01:00
2023-01-07 12:07:29 +01:00
2021-03-03 17:44:44 +01:00
2022-10-26 13:15:33 +02:00
2021-10-27 09:33:58 +02:00
2022-07-02 16:17:16 +02:00
2022-11-10 15:46:07 +01:00
2022-11-25 17:35:39 +01:00
2022-10-26 13:15:37 +02:00
2022-06-14 16:52:36 +02:00
2022-05-12 12:14:54 +02:00
2023-01-07 12:07:18 +01:00
2022-12-08 11:15:40 +01:00
2023-01-07 12:07:14 +01:00
2023-01-07 12:07:27 +01:00
2022-10-26 13:15:45 +02:00
2020-12-29 13:45:00 +01:00
2022-04-20 09:06:42 +02:00
2022-06-14 16:52:37 +02:00
2023-01-07 12:07:15 +01:00
2023-01-07 12:07:19 +01:00
2022-04-20 09:06:36 +02:00
2021-07-28 09:14:24 +02:00
2022-06-14 16:52:37 +02:00
2023-01-07 12:07:29 +01:00
2023-01-07 12:07:32 +01:00
2023-01-07 12:07:23 +01:00
2021-11-26 11:48:41 +01:00
2023-01-07 12:07:11 +01:00
2022-10-26 13:15:39 +02:00
2021-07-20 16:20:57 +02:00
2023-01-07 12:07:26 +01:00
2022-02-16 12:43:53 +01:00
2022-10-26 13:15:48 +02:00
2023-01-07 12:07:25 +01:00
2023-01-07 12:07:24 +01:00
2023-01-07 12:07:26 +01:00
2023-01-07 12:07:24 +01:00
2022-06-14 16:52:41 +02:00
2023-01-07 12:07:27 +01:00
2022-07-21 20:40:31 +02:00
2023-01-07 12:07:26 +01:00
2022-04-20 09:06:43 +02:00
2021-11-26 11:48:38 +01:00
2022-12-08 11:15:40 +01:00