Re: [PATCH] tun: disallow setting ARPHRD_MCTP link type via TUNSETLINK
From: patchwork-bot+netdevbpf
Date: Tue Nov 17 2026 - 21:20:09 EST
Hello:
This patch was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@xxxxxxxxxx>:
On Thu, 12 Nov 2026 18:40:55 +0530 you wrote:
> When an IFF_TUN device is registered as ARPHRD_NONE, mctp_register()
> attaches an mctp_dev context to it. For ARPHRD_NONE and ARPHRD_LOOPBACK
> devices, incoming packets in mctp_pkttype_receive() invoke __mctp_cb(skb),
> which initializes cb->magic = 0x4d435450 and zeros cb->halen.
>
> If a userspace process sets the link type of the TUN device to ARPHRD_MCTP
> via ioctl(fd, TUNSETLINK, ARPHRD_MCTP) and transmits a frame carrying
> protocol ETH_P_MCTP, mctp_pkttype_receive() evaluates dev->type ==
> ARPHRD_MCTP and calls mctp_cb(skb). Because frames allocated in
> tun_get_user() have a cleared skb->cb and were not constructed by an MCTP
> hardware driver, mctp_cb() trips:
>
> [...]
Here is the summary with links:
- tun: disallow setting ARPHRD_MCTP link type via TUNSETLINK
https://git.kernel.org/netdev/net/c/0a3778b93be4
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html