Add support for blocking socket creation for a specific protocol family, like AF_RDS for CVE-2026-43494 (PinTheft)
enhancement
## Feature Request
**Short Description**
Add support for blocking `socket_create` LSM hooks with matching family/domain `address_families(7)`.
**Is your feature request related to a problem? Please describe the use case.**
In order to mitigate CVE-2026-43494, I want to block `socket_create(family==AF_RDS)`
**Describe the solution you'd like**
```
#include <linux/bpf.h>
#include <bpf/bpf_helpers.h>
#include <bpf/bpf_tracing.h>
#define AF_RDS 21 // The socket family ID for RDS
SEC("lsm/socket_create")
int BPF_PROG(socket_create, int family, int type, int protocol, int kern)
{
// Ignore internal kernel socket creation, only block user-space requests
if (kern) {
return 0;
}
// Intercept and completely deny AF_RDS
if (family == AF_RDS) {
bpf_printk("CVE-2026-43494 Mitigation: Blocked AF_RDS socket creation attempt.\n");
return -EPERM; // Deny permission
}
return 0;
}
char _license[] SEC("license") = "GPL";
```
**Describe alternatives you've considered**
I want to solve this within the KubeArmor framework without having to write external BPF programs.
3 条评论