Stanislav Fomichev
148dcbd3af
ppp: associate skb with a device at tx
...
[ Upstream commit 9f225444467b98579cf28d94f4ad053460dfdb84 ]
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-14 10:16:18 +01:00
..
2022-12-02 17:40:02 +01:00
2023-01-14 10:15:35 +01:00
2022-07-07 17:52:18 +02:00
2023-01-14 10:15:44 +01:00
2023-01-14 10:15:44 +01:00
2023-01-14 10:16:16 +01:00
2023-01-14 10:15:42 +01:00
2023-01-14 10:16:16 +01:00
2022-05-09 09:05:06 +02:00
2022-10-30 09:41:19 +01:00
2022-12-14 11:32:00 +01:00
2022-09-28 11:10:34 +02:00
2022-09-28 11:10:30 +02:00
2022-09-28 11:10:33 +02:00
2022-09-08 11:11:40 +02:00
2022-12-08 11:23:56 +01:00
2022-12-14 11:32:04 +01:00
2023-01-14 10:16:18 +01:00
2022-04-20 09:23:24 +02:00
2022-09-28 11:10:31 +02:00
2022-12-14 11:31:54 +01:00
2022-12-14 11:32:01 +01:00
2023-01-14 10:15:43 +01:00
2022-09-28 11:10:34 +02:00
2023-01-14 10:16:16 +01:00
2022-12-14 11:32:04 +01:00
2022-04-08 14:40:22 +02:00
2022-08-25 11:38:02 +02:00
2022-05-30 09:33:26 +02:00
2022-12-21 17:32:08 +01:00
2023-01-14 10:16:09 +01:00
2022-11-25 17:45:55 +01:00
2022-04-13 21:00:59 +02:00
2023-01-14 10:15:44 +01:00
2022-08-03 12:00:46 +02:00
2022-04-13 21:00:59 +02:00
2022-11-25 17:45:48 +01:00
2022-12-08 11:23:56 +01:00
2022-04-20 09:23:11 +02:00
2022-08-25 11:37:57 +02:00
2022-04-27 13:53:53 +02:00
2022-12-14 11:32:02 +01:00