]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-client.git/commit
ipv6: ioam: fix potential NULL dereferences in __ioam6_fill_trace_data()
authorEric Dumazet <edumazet@google.com>
Thu, 2 Apr 2026 10:17:32 +0000 (10:17 +0000)
committerJakub Kicinski <kuba@kernel.org>
Fri, 3 Apr 2026 21:44:43 +0000 (14:44 -0700)
commit4e65a8b8daa18d63255ec58964dd192c7fdd9f8b
tree7af889ee2c839cbb8472fda9f55907a77e334a55
parent285fa6b1e03cff78ead0383e1b259c44b95faf90
ipv6: ioam: fix potential NULL dereferences in __ioam6_fill_trace_data()

We need to check __in6_dev_get() for possible NULL value, as
suggested by Yiming Qian.

Also add skb_dst_dev_rcu() instead of skb_dst_dev(),
and two missing READ_ONCE().

Note that @dev can't be NULL.

Fixes: 9ee11f0fff20 ("ipv6: ioam: Data plane support for Pre-allocated Trace")
Reported-by: Yiming Qian <yimingqian591@gmail.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Justin Iurman <justin.iurman@gmail.com>
Link: https://patch.msgid.link/20260402101732.1188059-1-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/ipv6/ioam6.c