MCPcopy Create free account
hub / github.com/bsauce/kernel-exploit-factory / netlink_init

Function netlink_init

CVE-2022-27666/exploit/exploit.c:263–272  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

261};
262
263static void netlink_init(struct nlmsg* nlmsg, int typ, int flags,
264 const void* data, int size)
265{
266 memset(nlmsg, 0, sizeof(*nlmsg));
267 struct nlmsghdr* hdr = (struct nlmsghdr*)nlmsg->buf;
268 hdr->nlmsg_type = typ;
269 hdr->nlmsg_flags = NLM_F_REQUEST | NLM_F_ACK | flags;
270 memcpy(hdr + 1, data, size);
271 nlmsg->pos = (char*)(hdr + 1) + NLMSG_ALIGN(size);
272}
273
274static void netlink_attr(struct nlmsg* nlmsg, int typ, const void* data, int size)
275{

Callers 6

netlink_query_family_idFunction · 0.85
netlink_add_device_implFunction · 0.85
netlink_device_changeFunction · 0.85
netlink_add_addrFunction · 0.85
initialize_devlink_portsFunction · 0.85
netlink_wireguard_setupFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected