I'm looking into kernel exploits in recent years, approx 80% of them requires user.max_user_namespaces with a positive value.
This setting is disabled in CentOS since 6.X series, but enabled in all recent Ubuntu LTS releases.
The conclusion seems to be "Ubuntu is more easily exploitable" due to "user.max_user_namespaces" is enabled by default.
I'm wondering why won't Ubuntu disable that too? Is there any advantage to enable it in default settings?
Ubuntu has kept it enabled for a lot longer than Debian, but see Debian's reasoning for enabling it in bullseye which I think is probably the same as Ubuntu's:
So they think the security benefits offered by this are good enough to not consider throwing out the whole thing.
And Ubuntu are aware of the security problems and are working on a mitigation using AppArmor:
(This post also mentions elsewhere how user namespaces have reduced the need for setuid.)
According to the blog post announcing this, it's disabled by default at the initial release of 23.10, and planned to be enabled later by a package update as they get more data. Older releases won't be affected.