user namespaces in Linux are presented as a security feature, which should increase security. But is this really true?
Is it possible that while user namespaces fix one kind of problem, they introduce another, unexpected, problem with potential vulnerabilities? If nothing else, namespaces are fantastically complicated structures, and adding them to kernel makes the kernel more complex.
Consider the example of chroot jail, which some application used to increase security. And here is beautiful example how chroot jail actually introduced a local privilege escalation bug:
CVE-2020-7468: TURNING IMPRISONMENT TO ADVANTAGE IN THE FREEBSD FTPD CHROOT JAIL https://www.zerodayinitiative.com/blog/2020/12/21/cve-2020-7468-turning-imprisonment-to-advantage-in-the-freebsd-ftpd-chroot-jail
I like minimalist approach to security: features and services that are not needed should be disabled.
In a situation where I actually don't need user namespaces, such as on my personal machine, would I be better off by disabling them in the kernel? I am not using docker on my machine, and as far as I know, browsers (chromium, firefox) only use PID and network namespaces, not user namespaces.