From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Andrew Lunn <andrew@lunn.ch>
Cc: Kalpesh Solanki <skalpesh942@gmail.com>,
alex.aring@gmail.com, stefan@datenfreihafen.org,
davem@davemloft.net, edumazet@kernel.org, kuba@kernel.org,
pabeni@redhat.com, horms@kernel.org,
linux-wpan@vger.kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org,
syzbot+9ea34da5ca6100593c90@syzkaller.appspotmail.com,
stable@vger.kernel.org
Subject: Re: [PATCH] ieee802154: nl-mac: validate device pointers before dereference
Date: Mon, 16 Nov 2026 15:37:23 +0100 [thread overview]
Message-ID: <878q2ssuzg.fsf@bootlin.com> (raw)
In-Reply-To: <776e6791-2677-4bd1-ac00-4eef07d5a4a6@lunn.ch> (Andrew Lunn's message of "Sun, 1 Nov 2026 20:43:29 +0100")
Hello,
On 01/11/2026 at 20:43:29 +01, Andrew Lunn <andrew@lunn.ch> wrote:
> On Sun, Nov 01, 2026 at 02:52:19PM +0530, Kalpesh Solanki wrote:
>> A virtual network device (such as a TUN interface) can have its link
>> type set to ARPHRD_IEEE802154 via ioctl(tun_fd, TUNSETLINK,
>> ARPHRD_IEEE802154). However, such devices do not have an IEEE 802.15.4
>> private context allocated (dev->ieee802154_ptr is NULL) and do not
>> register MAC operations (dev->ml_priv / ieee802154_mlme_ops(dev) is NULL).
>
>> Fix this by ensuring dev->ieee802154_ptr and ieee802154_mlme_ops(dev)
>> are non-NULL before proceeding in ieee802154_nl_get_dev(),
>> ieee802154_dump_iface(), and ieee802154_llsec_dump_table().
>
> Did you consider the other fix? Is there a use case for setting a TUN
> interface to ARPHRD_IEEE802154? If not, maybe return EOPNOTSUPP, or
> EINVAL?
Sorry for the delay, I was away for two weeks, but I definitely agree
that I (we?) never intended to add tun support for WPAN devices. I don't
think it really makes sense anyway. So yes, preventing the 802154 "TUN
type" is likely the way to go IMHO.
Thanks,
Miquèl
next prev parent reply other threads:[~2026-11-16 14:37 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-01 9:22 Kalpesh Solanki
2026-11-01 19:43 ` Andrew Lunn
2026-11-16 14:37 ` Miquel Raynal [this message]
2026-11-02 2:47 ` Kalpesh Solanki
2026-11-02 14:00 ` Andrew Lunn
2026-11-02 9:24 ` netdev-bot+sashiko
2026-11-06 14:24 ` [PATCH net v2] tun: disallow setting IEEE 802.15.4 link types via TUNSETLINK Kalpesh Solanki
2026-11-06 16:53 ` Willem de Bruijn
2026-11-06 20:21 ` Willem de Bruijn
2026-11-10 14:41 ` netdev-bot+sashiko
2026-11-02 15:01 [PATCH] ieee802154: nl-mac: validate device pointers before dereference Kalpesh Solanki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=878q2ssuzg.fsf@bootlin.com \
--to=miquel.raynal@bootlin.com \
--cc=alex.aring@gmail.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wpan@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=skalpesh942@gmail.com \
--cc=stable@vger.kernel.org \
--cc=stefan@datenfreihafen.org \
--cc=syzbot+9ea34da5ca6100593c90@syzkaller.appspotmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®