how to trigger CALIPSO netlable opt insert

8 views
Skip to first unread message

T. Williams

unread,
Sep 4, 2023, 2:44:13 PM9/4/23
to netlabel
Hello,
i want to trigger this line of code
https://elixir.bootlin.com/linux/v6.0.1/source/net/ipv6/calipso.c#L916 but the hop variable always ends up as NULL when I send an Ipv6 calipso packet In order to do that get the hop as non-NULL I think I need calipso_opt_getattr to be called. That requires selinux_netlbl_socket_setsockopt https://elixir.bootlin.com/linux/v6.0.1/source/security/selinux/netlabel.c#L504to to set the secattr type to NETLBL_NLTYPE_CALIPSO here https://elixir.bootlin.com/linux/v6.0.1/source/net/ipv6/calipso.c#L1050 (it follows from selinux_netlbl_socket_setsockopt -> netlbl_sock_getattr -> calipso_opt_getattr). However when I do this I still get that hop is NULL in the
Is there any way I trigger this line of code from userspace? Where or who should I ask this question to?

Paul Moore

unread,
Sep 4, 2023, 3:14:37 PM9/4/23
to T. Williams, netlabel
As I mentioned to you earlier, the LSM list is likely the best forum
for this question.

Beyond that, what Linux distribution are you using, what LSMs do you
have enabled, and how are you configuring the LSMs and NetLabel?

--
paul-moore.com
Reply all
Reply to author
Forward
0 new messages