Skip to content

RFC netlink check sender

Chris Wright netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest3 patches 17 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3netlink check senderinclude/linux/netlink.h net/netlink/af_netlink.c+22 -64 replies
2/3netlink check sender, auditkernel/audit.c+16 -1113 replies
3/3netlink check sender, rtnetlinknet/core/rtnetlink.c+27 -110 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC][PATCH 0/3] netlink check sender

The following patches are for comment. They introduce a new callback to enable netlink messages to be validated in the sender's context, and then convert a couple kernel netlink receivers to use this callback. This eliminates the need to copy the sender's effective capabilities into the netlink control buffer. It also allows the audit system to manage the loginuid in the kernel without adding more fields to netlink_skb_parms or requiring special case netlink code. I think this would obsolete the security_netlink_recv hook, and simplify the security_netlink_send hook.

Currently I've only hooked the unicast messages, because I didn't think any of the kernel netlink input functions would be processing broadcast messages (perhaps I missed something).

I didn't move the logic that simply ignores messages (e.g. type < RTM_BASE), but I did move the logic that looks for invalid messages (e.g. type > RTM_MAX) to the check_sender callback.

Thoughts?

thanks,
-chris

Signature · 1 line
Linux Security Modules     http://lsm.immunix.org     http://lsm.bkbits.net