Re: [PATCH] mctp: route: verify socket ownership in mctp_lookup_prealloc_tag()

From: Jeremy Kerr

Date: Sun Sep 20 2026 - 04:39:21 EST


Hi Hui,

> When a socket transmits a packet with `MCTP_TAG_PREALLOC` set,
> mctp_lookup_prealloc_tag() iterates over the per-netns `&mns->keys`
> list and matches `netid`, `req_tag`, `peer_addr`, and `manual_alloc`,
> but omits checking whether `tmp->sk == &msk->sk`.

OK, good catch.


> Verify `tmp->sk == &msk->sk` in `mctp_lookup_prealloc_tag()`.

Or we could instead iterate the socket's tag list?

Cheers,


Jeremy