netfilter: nfnetlink_log: initialize nfgenmsg in NLMSG_DONE terminator
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 29c5d4afba51c71cfeadd3f74f3c42e064483fb0 · < d552bcfca323d175664d7444989b04f55666978a| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
netfilter: nfnetlink_log: initialize nfgenmsg in NLMSG_DONE terminator
When batching multiple NFLOG messages (inst->qlen > 1), __nfulnl_send() appends an NLMSG_DONE terminator with sizeof(struct nfgenmsg) payload via nlmsg_put(), but never initializes the nfgenmsg bytes. The nlmsg_put() helper only zeroes alignment padding after the payload, not the payload itself, so four bytes of stale kernel heap data are leaked to userspace in the NLMSG_DONE message body.
Use nfnl_msg_put() to build the NLMSG_DONE terminator, which initializes the nfgenmsg payload via nfnl_fill_hdr(), consistent with how __build_packet_message() already constructs NFULNL_MSG_PACKET headers.
From the CVE record · Linux
The Linux kernel's nfnetlink_log component leaves four bytes of kernel heap data uninitialized in an NLMSG_DONE message. When multiple NFLOG messages are batched, those bytes can leak to userspace. The input does not specify authentication or user-interaction requirements.
Engineers running Linux kernels with the nfnetlink_log component should check their deployments; affected versions are not specified.