-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(u|g)idMappings should not exist when joining an existing user ns #4122
Comments
There's another problem -- we don't check that
EDIT: Ah, this isn't an issue in the validator. The problem is that |
I have a patch for this, but in writing tests I found two separate issues:
I'm still debugging 2. For 1, I don't really know how much there is to do -- maybe it's fair to say that we just don't support that use-case? @kolyshkin? |
I think we should backport the PR to |
@cyphar In the commit 09822c3, you fix the validation issues about |
@lifubang We would only need to backport the userns changes. That being said, I'm not sure whether we plan to have a 1.1.11 release. If we do, we should backport the fix, so I tagged it as such. |
Feels like we have to make 1.1.11. |
I'll do the backport then. Can we make it the last 1.1.z release? 😸 |
We also need #4134 for the backport, because the original patch broke containerd and crio. |
#4144 has been merged, close this and prepare to release |
Description
When reviewing #3985, we found an error when joining an existing user namespace.
Ref: #3985 (comment)
Steps to reproduce the issue
start a container test with user mapping, for example:
.linux.namespaces += [{"type": "user"}]
.linux.uidMappings = [{"hostID": 100000, "containerID": 0, "size": 65536}]
.linux.gidMappings = [{"hostID": 100000, "containerID": 0, "size": 65536}]
get the container init process's pid
runc ps test
for example the pid is 14821
start an new container test1 with pid 14821's user namespace, for example:
.linux.namespaces += [{"type": "user", "path": "/proc/14821/ns/user"}]
Describe the results you received and expected
Received:
ERRO[0000] runc run failed: User namespaces enabled, but no uid mappings found.
Expected:
The container should be started successfully.
What version of runc are you using?
all
Host OS information
NAME="Ubuntu"
VERSION="20.04.6 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.6 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal
Host kernel information
Linux codespaces-21ad96 6.2.0-1016-azure #16~22.04.1-Ubuntu SMP Tue Oct 10 17:11:51 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
The text was updated successfully, but these errors were encountered: