inet: frags: publish queues before arming timer
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 648700f76b03b7e8149d13cc2bdb3355035258a9 · < 9f904dd3e455750e5d4ec9b2f134835811b85a2f| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
inet: frags: publish queues before arming timer
inet_frag_create() arms the fragment queue timer before inserting the queue into the fqdir rhashtable. If the namespace fragment timeout is zero or negative, the timer can run before the queue is published.
The timer callback then marks the queue complete, tries to remove a node that is not in the hash table yet, and drops the anticipated hash reference. Creation can subsequently publish the completed queue without restoring that reference, leaving a stale hash node after the caller drops the remaining reference.
Publish the queue first and arm the timer while holding the queue lock. This makes timer expiry wait until the queue is visible in the hash table, so inet_frag_kill() can remove the node and balance the hash reference.
From the CVE record · Linux
The Linux kernel can leave a stale hash node when a fragment queue timer fires before the queue is inserted into the hash table. This can occur when the namespace fragment timeout is zero or negative. The input does not establish how an attacker could trigger it or what access or user interaction would be required.
Engineers running the Linux kernel should check their versions against the vendor advisory; affected versions were not provided.