Daan De Meyer
01e6465b55
nsresourced: Verify user namespace identity on registry lookup
...
When a user namespace dies and its registry entry is torn down, the kernel
can recycle its inode number for a freshly-created namespace. A subsequent
registration or operation request can therefore find a stale registry entry
keyed by the same inode that actually belongs to a different, now-dead user
namespace.
Use NS_GET_ID to compare the kernel-assigned namespace identifier against
the stored one whenever we look up the registry from a live userns fd
(AddMount/AddControlGroup/AddNetworkInterface, plus the two registration
paths). Extract release_userns_by_info()/release_userns_by_inode() into
userns-registry.c so nsresourcework can fully clean up stale entries
(BPF allowlist, fdstore fd, cgroups, netifs, on-disk record) before reusing
the slot, and remove the now-unused userns_registry_inode_exists().
Co-developed-by: Claude Opus 4.7 <noreply@anthropic.com >
2026-05-21 14:26:35 +00:00
..
2026-05-05 11:14:33 +02:00
2026-05-21 10:33:03 +09:00
2026-04-30 11:12:33 +01:00
2026-05-18 02:55:56 +09:00
2026-05-21 16:21:13 +02:00
2026-04-30 11:12:33 +01:00
2026-04-30 11:12:33 +01:00
2026-05-16 18:37:10 +02:00
2026-05-21 10:33:03 +09:00
2026-05-21 10:33:03 +09:00
2026-05-19 08:54:27 +02:00
2026-05-16 18:37:10 +02:00
2026-04-30 11:12:33 +01:00
2026-04-30 11:12:33 +01:00
2026-05-21 12:08:33 +01:00
2026-05-21 10:33:03 +09:00
2026-05-18 21:17:38 +00:00
2026-05-18 21:17:38 +00:00
2026-05-18 21:17:38 +00:00
2026-04-12 13:25:28 +01:00
2026-04-30 11:12:33 +01:00
2026-04-30 11:12:33 +01:00
2026-05-16 18:36:08 +02:00
2026-04-30 11:12:33 +01:00
2026-05-16 18:37:10 +02:00
2026-05-21 10:33:03 +09:00
2026-04-13 13:20:43 +02:00
2026-05-19 13:12:43 +01:00
2026-05-21 10:33:03 +09:00
2026-05-18 02:44:46 +09:00
2026-04-23 11:45:22 +02:00
2026-04-30 11:12:33 +01:00
2026-04-30 11:12:33 +01:00
2026-05-21 09:09:38 +09:00
2026-05-18 02:55:56 +09:00
2026-05-16 18:37:10 +02:00
2026-05-16 18:37:10 +02:00
2026-05-08 16:52:57 +02:00
2026-05-21 10:33:03 +09:00
2026-05-21 16:21:13 +02:00
2026-05-16 18:37:10 +02:00
2026-05-18 21:17:38 +00:00
2026-05-19 08:54:27 +02:00
2026-05-16 18:37:10 +02:00
2026-05-16 18:37:10 +02:00
2026-05-21 05:06:35 +09:00
2026-05-21 16:23:44 +02:00
2026-05-21 16:55:59 +09:00
2026-05-21 10:33:03 +09:00
2026-05-21 10:33:03 +09:00
2026-05-21 08:53:07 +01:00
2026-05-21 10:33:03 +09:00
2026-04-30 11:12:33 +01:00
2026-05-16 18:37:10 +02:00
2026-05-14 08:12:28 +02:00
2026-05-18 02:55:56 +09:00
2026-04-30 08:05:54 +02:00
2026-05-05 13:49:51 +02:00
2026-05-05 17:23:16 +02:00
2026-05-21 16:23:44 +02:00
2026-05-05 11:14:33 +02:00
2026-05-21 10:33:03 +09:00
2026-05-21 14:26:35 +00:00
2026-04-24 16:45:19 +01:00
2026-05-21 10:33:03 +09:00
2026-04-12 21:20:15 +01:00
2026-05-18 21:42:56 +02:00
2026-04-30 11:12:33 +01:00
2026-05-05 17:23:16 +02:00
2026-05-21 10:33:03 +09:00
2026-05-18 21:17:38 +00:00
2026-05-18 21:17:38 +00:00
2026-04-30 11:12:33 +01:00
2026-05-16 18:37:10 +02:00
2026-05-20 16:22:00 +02:00
2026-05-21 09:05:26 +09:00
2026-05-21 10:33:03 +09:00
2026-05-18 02:55:56 +09:00
2026-05-05 17:22:26 +02:00
2026-05-21 10:33:03 +09:00
2026-05-21 16:21:13 +02:00
2026-05-15 13:46:08 +01:00
2026-05-18 02:55:56 +09:00
2026-05-18 21:17:38 +00:00
2026-05-20 04:29:59 +09:00
2026-05-16 18:37:10 +02:00
2026-04-30 11:12:33 +01:00
2026-05-16 18:37:10 +02:00
2026-04-30 11:12:33 +01:00
2026-04-30 11:12:33 +01:00
2026-05-16 18:37:10 +02:00
2026-05-21 09:09:38 +09:00
2026-05-21 10:33:03 +09:00
2026-05-21 16:23:44 +02:00
2026-05-21 14:54:36 +02:00
2026-05-21 10:33:03 +09:00
2026-05-21 16:21:13 +02:00
2026-05-16 18:37:10 +02:00
2026-05-18 21:17:38 +00:00
2026-05-21 10:33:03 +09:00
2026-04-30 11:12:33 +01:00
2026-05-21 10:33:03 +09:00
2026-05-21 10:33:03 +09:00
2026-05-20 16:04:26 +00:00
2026-04-30 11:12:33 +01:00
2026-05-16 18:37:10 +02:00
2026-05-18 21:17:38 +00:00
2026-04-30 11:12:33 +01:00
2026-05-16 18:37:10 +02:00
2026-05-20 16:34:21 +02:00
2026-05-16 18:37:10 +02:00
2026-04-22 16:49:36 +02:00
2026-05-20 23:39:47 +02:00
2026-04-30 11:12:33 +01:00
2026-04-12 15:27:15 +02:00