netfilter: nfnetlink_queue: do shared-unconfirmed check before segmentation
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 7d8dc1c7be8d3509e8f5164dd5df64c8e34d7eeb · < 207b3ebacb6113acaaec0d171d5307032c690004| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
netfilter: nfnetlink_queue: do shared-unconfirmed check before segmentation
Ulrich reports a regression with nfqueue:
If an application did not set the 'F_GSO' capability flag and a gso packet with an unconfirmed nf_conn entry is received all packets are now dropped instead of queued, because the check happens after skb_gso_segment(). In that case, we did have exclusive ownership of the skb and its associated conntrack entry. The elevated use count is due to skb_clone happening via skb_gso_segment().
Move the check so that its peformed vs. the aggregated packet.
Then, annotate the individual segments except the first one so we can do a 2nd check at reinject time.
For the normal case, where userspace does in-order reinjects, this avoids packet drops: first reinjected segment continues traversal and confirms entry, remaining segments observe the confirmed entry.
While at it, simplify nf_ct_drop_unconfirmed(): We only care about unconfirmed entries with a refcnt > 1, there is no need to special-case dying entries.
From the CVE record · Linux
The Linux kernel’s nfnetlink_queue can drop UDP packets instead of queueing them when an application has not set the F_GSO flag and receives a GSO packet with an unconfirmed conntrack entry. The input does not describe an attacker or specify network, authentication, or user-interaction requirements.
Engineers running the Linux kernel with applications that use nfqueue should check their deployments; affected versions are not specified.