Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: opencontainers/runc
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.1.10
Choose a base ref
...
head repository: opencontainers/runc
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v1.1.11
Choose a head ref
  • 13 commits
  • 27 files changed
  • 6 contributors

Commits on Nov 1, 2023

  1. VERSION: back to development

    Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
    Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
    kolyshkin authored and cyphar committed Nov 1, 2023
    Configuration menu
    Copy the full SHA
    be88784 View commit details
    Browse the repository at this point in the history
  2. merge #4100 into opencontainers/runc:release-1.1

    Kir Kolyshkin (2):
      VERSION: back to development
      VERSION: release 1.1.10
    
    LGTMs: AkihiroSuda lifubang
    cyphar committed Nov 1, 2023
    Configuration menu
    Copy the full SHA
    f3446b1 View commit details
    Browse the repository at this point in the history

Commits on Dec 11, 2023

  1. build(deps): bump github.com/cyphar/filepath-securejoin

    Bumps [github.com/cyphar/filepath-securejoin](https://github.com/cyphar/filepath-securejoin) from 0.2.3 to 0.2.4.
    - [Release notes](https://github.com/cyphar/filepath-securejoin/releases)
    - [Commits](cyphar/filepath-securejoin@v0.2.3...v0.2.4)
    
    ---
    updated-dependencies:
    - dependency-name: github.com/cyphar/filepath-securejoin
      dependency-type: direct:production
      update-type: version-update:semver-patch
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    (cherry picked from commit c7ad274)
    Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
    dependabot[bot] authored and thaJeztah committed Dec 11, 2023
    Configuration menu
    Copy the full SHA
    32a26a7 View commit details
    Browse the repository at this point in the history

Commits on Dec 12, 2023

  1. Merge pull request #4140 from thaJeztah/1.1_backport_update_securejoin

    [1.1 backport] build(deps): bump github.com/cyphar/filepath-securejoin
    kolyshkin authored Dec 12, 2023
    Configuration menu
    Copy the full SHA
    4f13093 View commit details
    Browse the repository at this point in the history
  2. libct/cg: add swapOnlyUsage in MemoryStats

    This field reports swap-only usage. For cgroupv1, `Usage` and `Failcnt`
    are set by subtracting memory usage from memory+swap usage. For cgroupv2,
    `Usage`, `Limit`, and `MaxUsage` are set. This commit also export `MaxUsage`
    of memory under cgroupv2 mode, using `memory.peak` introduced in kernel 5.19.
    
    Signed-off-by: Heran Yang <heran55@126.com>
    (cherry picked from commit 104b8dc)
    Signed-off-by: Harshal Patil <harpatil@redhat.com>
    HeRaNO authored and harche committed Dec 12, 2023
    Configuration menu
    Copy the full SHA
    87792ce View commit details
    Browse the repository at this point in the history
  3. Merge pull request #4131 from harche/backport

    [1.1] feat: add swapOnlyUsage in MemoryStats
    mrunalp authored Dec 12, 2023
    Configuration menu
    Copy the full SHA
    75d99b4 View commit details
    Browse the repository at this point in the history

Commits on Dec 14, 2023

  1. *: actually support joining a userns with a new container

    (This is a cherry-pick of 1912d59.)
    
    Our handling for name space paths with user namespaces has been broken
    for a long time. In particular, the need to parse /proc/self/*id_map in
    quite a few places meant that we would treat userns configurations that
    had a namespace path as if they were a userns configuration without
    mappings, resulting in errors.
    
    The primary issue was down to the id translation helper functions, which
    could only handle configurations that had explicit mappings. Obviously,
    when joining a user namespace we need to map the ids but figuring out
    the correct mapping is non-trivial in comparison.
    
    In order to get the mapping, you need to read /proc/<pid>/*id_map of a
    process inside the userns -- while most userns paths will be of the form
    /proc/<pid>/ns/user (and we have a fast-path for this case), this is not
    guaranteed and thus it is necessary to spawn a process inside the
    container and read its /proc/<pid>/*id_map files in the general case.
    
    As Go does not allow us spawn a subprocess into a target userns,
    we have to use CGo to fork a sub-process which does the setns(2). To be
    honest, this is a little dodgy in regards to POSIX signal-safety(7) but
    since we do no allocations and we are executing in the forked context
    from a Go program (not a C program), it should be okay. The other
    alternative would be to do an expensive re-exec (a-la nsexec which would
    make several other bits of runc more complicated), or to use nsenter(1)
    which might not exist on the system and is less than ideal.
    
    Because we need to logically remap users quite a few times in runc
    (including in "runc init", where joining the namespace is not feasable),
    we cache the mapping inside the libcontainer config struct. A future
    patch will make sure that we stop allow invalid user configurations
    where a mapping is specified as well as a userns path to join.
    
    Finally, add an integration test to make sure we don't regress this again.
    
    Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
    cyphar committed Dec 14, 2023
    Configuration menu
    Copy the full SHA
    0c8e2cc View commit details
    Browse the repository at this point in the history
  2. configs: disallow ambiguous userns and timens configurations

    (This is a cherry-pick of 09822c3.)
    
    For userns and timens, the mappings (and offsets, respectively) cannot
    be changed after the namespace is first configured. Thus, configuring a
    container with a namespace path to join means that you cannot also
    provide configuration for said namespace. Previously we would silently
    ignore the configuration (and just join the provided path), but we
    really should be returning an error (especially when you consider that
    the configuration userns mappings are used quite a bit in runc with the
    assumption that they are the correct mapping for the userns -- but in
    this case they are not).
    
    In the case of userns, the mappings are also required if you _do not_
    specify a path, while in the case of the time namespace you can have a
    container with a timens but no mappings specified.
    
    It should be noted that the case checking that the user has not
    specified a userns path and a userns mapping needs to be handled in
    specconv (as opposed to the configuration validator) because with this
    patchset we now cache the mappings of path-based userns configurations
    and thus the validator can't be sure whether the mapping is a cached
    mapping or a user-specified one. So we do the validation in specconv,
    and thus the test for this needs to be an integration test.
    
    Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
    cyphar committed Dec 14, 2023
    Configuration menu
    Copy the full SHA
    8f8cb45 View commit details
    Browse the repository at this point in the history
  3. integration: add mega-test for joining namespaces

    (This is a cherry-pick of 6fa8d06.)
    
    Given we've had several bugs in this behaviour that have now been fixed,
    add an integration test that makes sure that you can start a container
    that joins all of the namespaces of a second container.
    
    The only namespace we do not join is the mount namespace, because
    joining a namespace that has been pivot_root'd leads to a bunch of
    errors. In principle, removing everything from config.json that requires
    a mount _should_ work, but the root.path configuration is mandatory and
    we cannot just ignore setting up the rootfs in the namespace joining
    scenario (if the user has configured a different rootfs, we need to use
    it or error out, and there's no reasonable way of checking if if the
    rootfs paths are the same that doesn't result in spaghetti logic).
    
    Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
    cyphar committed Dec 14, 2023
    Configuration menu
    Copy the full SHA
    2dd8368 View commit details
    Browse the repository at this point in the history
  4. specconv: temporarily allow userns path and mapping if they match

    (This is a cherry-pick of ebcef3e.)
    
    It turns out that the error added in commit 09822c3 ("configs:
    disallow ambiguous userns and timens configurations") causes issues with
    containerd and CRIO because they pass both userns mappings and a userns
    path.
    
    These configurations are broken, but to avoid the regression in this one
    case, output a warning to tell the user that the configuration is
    incorrect but we will continue to use it if and only if the configured
    mappings are identical to the mappings of the provided namespace.
    
    Fixes: 09822c3 ("configs: disallow ambiguous userns and timens configurations")
    Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
    cyphar committed Dec 14, 2023
    Configuration menu
    Copy the full SHA
    e65d4ca View commit details
    Browse the repository at this point in the history
  5. configs: make id mappings int64 to better handle 32-bit

    (This is a cherry-pick of 482e563.)
    
    Using ints for all of our mapping structures means that a 32-bit binary
    errors out when trying to parse /proc/self/*id_map:
    
      failed to cache mappings for userns: failed to parse uid_map of userns /proc/1/ns/user:
      parsing id map failed: invalid format in line "         0          0 4294967295": integer overflow on token 4294967295
    
    This issue was unearthed by commit 1912d59 ("*: actually support
    joining a userns with a new container") but the underlying issue has
    been present since the docker/libcontainer days.
    
    In theory, switching to uint32 (to match the spec) instead of int64
    would also work, but keeping everything signed seems much less
    error-prone. It's also important to note that a mapping might be too
    large for an int on 32-bit, so we detect this during the mapping.
    
    Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
    cyphar committed Dec 14, 2023
    Configuration menu
    Copy the full SHA
    617db78 View commit details
    Browse the repository at this point in the history

Commits on Dec 16, 2023

  1. Merge pull request #4144 from cyphar/1.1-ns-path-handling

    [1.1] *: fix several issues with userns path handling
    lifubang authored Dec 16, 2023
    Configuration menu
    Copy the full SHA
    930fde5 View commit details
    Browse the repository at this point in the history

Commits on Jan 2, 2024

  1. VERSION: release 1.1.11

    Signed-off-by: lfbzhm <lifubang@acmcoder.com>
    Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
    lifubang authored and cyphar committed Jan 2, 2024
    Configuration menu
    Copy the full SHA
    4bccb38 View commit details
    Browse the repository at this point in the history
Loading