selinux_netlbl_sock_rcv_skb(9)
π selinux_netlbl_sock_rcv_skb(9) β¨
okay so bestie, welcome to the Kernel API Manual β yes we're reading kernel docs together, this is our bonding era π«Ά. Today's main character is selinux_netlbl_sock_rcv_skb, and honestly? She's doing a lot of quiet little work so your inbound packets get checked properly. Let's get into it.
πΈ NAME πΈ
selinux_netlbl_sock_rcv_skb β literally does an inbound access check using NetLabel π
π SYNOPSIS π
int selinux_netlbl_sock_rcv_skb (struct sk_security_struct *sksec ,
struct sk_buff *skb , u16 family , struct common_audit_data *ad );
β¨ ARGUMENTS β¨
sksecβ the sock'ssk_security_struct, i.e. the little security struct attached to the socket πskbβ the packet itself, the whole reason we're here π¦familyβ the protocol family πadβ the audit data π
π¦ DESCRIPTION π¦
So what she actually does: she fetches the NetLabel security attributes off of skb and then performs an access check against the receiving socket. That's the whole vibe check π₯.
Returns zero on success, and negative values on error. No cap. π
π SEE ALSO π
- Kernel file
./security/selinux/netlabel.cβ go read the source bestie, it's right there π§ selinux_netlbl_sidlookup_cached(9)selinux_netlbl_sock_genattr(9)selinux_netlbl_sock_getattr(9)selinux_netlbl_cache_invalidate(9)selinux_netlbl_err(9)selinux_netlbl_sk_security_free(9)selinux_netlbl_sk_security_reset(9)selinux_netlbl_skbuff_getsid(9)selinux_netlbl_skbuff_setsid(9)selinux_netlbl_sctp_assoc_request(9)selinux_netlbl_inet_conn_request(9)selinux_netlbl_inet_csk_clone(9)selinux_netlbl_sctp_sk_clone(9)selinux_netlbl_socket_post_create(9)selinux_netlbl_option(9)selinux_netlbl_socket_setsockopt(9)selinux_netlbl_socket_connect_helper(9)selinux_netlbl_socket_connect_locked(9)selinux_netlbl_socket_connect(9)
like, the whole netlabel friend group showed up for this one ππ
ngl this one's short but she's important β she's the inbound check, so treat her right π
bye bestie, mwah π β this page lives in ./security/selinux, dated October 2026, and it's literally called selinux_netlbl_sock_rcv_skb(9). slay, go read the kernel πβ¨π
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms