ipset double-free yields local root from user namespaces
A proposed kernel fix closes a duplicate free during hash-set resize, but a maintainer wants a real name before taking it.
A double-free in the Linux kernel's netfilter ipset code can be turned into local root from an unprivileged user namespace, according to a fix posted to the kernel mailing list.
ipset holds the address sets used by packet filters. When a hash set is resized, elements and the extra data attached to them are copied into a new table. Collection of an expired entry can then free memory the new table still references. A previous fix stopped the background collector from running during a resize, but the path that adds an element still collects expired entries when a region is full, and that path is reachable from the network stack while a resize is under way.
The author, posting as onLeaf, said an unprivileged process can hit that path with network-admin rights inside a freshly created user and network namespace. The duplicate free was caught by KASAN on x86-64 and, on a kernel without that instrumentation, was used to go from an ordinary account to root in the initial user namespace. The bug was found through AI-assisted source review; the change itself was prepared with help from OpenAI's Codex.
The proposed fix makes the add-path collector wait on the same lock as the background collector and skip work while a resize is in progress. A stable backport was requested.
Greg Kroah-Hartman replied with a one-line rejection of the submission as filed: "Real name please."