drop_monitor: fix size calculations for 64-bit attributes
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ ca30707dee2bc8bc81cfd8b4277fe90f7ca6df1f · < 7089f7ab99c89f443c92d8fcc585e63f2727f0b3| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
drop_monitor: fix size calculations for 64-bit attributes
net_dm_packet_report_fill() and net_dm_hw_packet_report_fill() use nla_put_u64_64bit() to append 64-bit attributes (NET_DM_ATTR_PC and NET_DM_ATTR_TIMESTAMP).
On 32-bit architectures without CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS, nla_put_u64_64bit() may append a 4-byte NET_DM_ATTR_PAD attribute for 64-bit alignment.
However, net_dm_packet_report_size() and net_dm_hw_packet_report_size() used nla_total_size(sizeof(u64)) instead of nla_total_size_64bit(sizeof(u64)), budgeting 12 bytes instead of up to 16 bytes.
This under-estimation of SKB size can lead to an skb_over_panic() when __nla_reserve() or skb_put() is subsequently called.
Fix this by using nla_total_size_64bit(sizeof(u64)) in both size calculations.
From the CVE record · Linux
Linux kernel drop_monitor underestimates the space needed for 64-bit attributes on certain 32-bit architectures, which can trigger an skb_over_panic(). The input does not specify how an attacker could reach this code, whether authentication or user interaction is needed, or whether access is local or over a network.
Operators running the Linux kernel on 32-bit architectures without CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS should check their installations; affected versions are not specified.