Skip to content
Snippets Groups Projects
Commit 1ed6ca28 authored by Oliver Hartkopp's avatar Oliver Hartkopp Committed by Frieder Schrempf
Browse files

can: isotp: check CAN address family in isotp_bind()

commit c6adf659 upstream

Add missing check to block non-AF_CAN binds.

Syzbot created some code which matched the right sockaddr struct size
but used AF_XDP (0x2C) instead of AF_CAN (0x1D) in the address family
field:

bind$xdp(r2, &(0x7f0000000540)={0x2c, 0x0, r4, 0x0, r2}, 0x10)
                                ^^^^
This has no funtional impact but the userspace should be notified about
the wrong address family field content.

Link: https://syzkaller.appspot.com/text?tag=CrashLog&x=11ff9d8c480000


Reported-by: default avatar <syzbot+5aed6c3aaba661f5b917@syzkaller.appspotmail.com>
Signed-off-by: default avatarOliver Hartkopp <socketcan@hartkopp.net>
Link: https://lore.kernel.org/all/20230104201844.13168-1-socketcan@hartkopp.net


Signed-off-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 5fb8a229
No related branches found
No related tags found
1 merge request!113🤖 Sync Bot: Update v5.10-ktn to Latest Stable Kernel (v5.10.200)
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment