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: moby/moby
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v23.0.2
Choose a base ref
...
head repository: moby/moby
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v23.0.3
Choose a head ref
  • 6 commits
  • 8 files changed
  • 2 contributors

Commits on Mar 21, 2023

  1. libnet/d/overlay: document some encryption code

    The overlay-network encryption code is woefully under-documented, which
    is especially problematic as it operates on under-documented kernel
    interfaces. Document what I have puzzled out of the implementation for
    the benefit of the next poor soul to touch this code.
    
    Signed-off-by: Cory Snider <csnider@mirantis.com>
    (cherry picked from commit d4fd582)
    Signed-off-by: Cory Snider <csnider@mirantis.com>
    corhere committed Mar 21, 2023
    Configuration menu
    Copy the full SHA
    018edb0 View commit details
    Browse the repository at this point in the history
  2. libn/d/overlay: enforce encryption on sandbox init

    The iptables rules which make encryption mandatory on an encrypted
    overlay network are only programmed once there is a second node
    participating in the network. This leaves single-node encrypted overlay
    networks vulnerable to packet injection. Furthermore, failure to program
    the rules is not treated as a fatal error.
    
    Program the iptables rules to make encryption mandatory before creating
    the VXLAN link to guarantee that there is no window of time where
    incoming cleartext VXLAN packets for the network would be accepted, or
    outgoing cleartext packets be transmitted. Only create the VXLAN link if
    programming the rules succeeds to ensure that it fails closed.
    
    Signed-off-by: Cory Snider <csnider@mirantis.com>
    (cherry picked from commit 142f46c)
    Signed-off-by: Cory Snider <csnider@mirantis.com>
    corhere committed Mar 21, 2023
    Configuration menu
    Copy the full SHA
    c492a22 View commit details
    Browse the repository at this point in the history
  3. libnet/d/overlay: extract VNI match rule builder

    The iptables rule clause used to match on the VNI of VXLAN datagrams
    looks like line noise to the uninitiated. It doesn't help that the
    expression is repeated twice and neither copy has any commentary.
    DRY out the rule builder to a common function, and document what the
    rule does and how it works.
    
    Signed-off-by: Cory Snider <csnider@mirantis.com>
    (cherry picked from commit 44cf27b)
    Signed-off-by: Cory Snider <csnider@mirantis.com>
    corhere committed Mar 21, 2023
    Configuration menu
    Copy the full SHA
    5c5fac2 View commit details
    Browse the repository at this point in the history
  4. libnet/d/overlay: add BPF-powered VNI matcher

    Some newer distros such as RHEL 9 have stopped making the xt_u32 kernel
    module available with the kernels they ship. They do ship the xt_bpf
    kernel module, which can do everything xt_u32 can and more. Add an
    alternative implementation of the iptables match rule which uses xt_bpf
    to implement exactly the same logic as the u32 filter using a BPF
    program. Try programming the BPF-powered rules as a fallback when
    programming the u32-powered rules fails.
    
    Signed-off-by: Cory Snider <csnider@mirantis.com>
    (cherry picked from commit 105b983)
    Signed-off-by: Cory Snider <csnider@mirantis.com>
    corhere committed Mar 21, 2023
    Configuration menu
    Copy the full SHA
    98cbcb8 View commit details
    Browse the repository at this point in the history

Commits on Mar 23, 2023

  1. libnet/d/overlay: insert the input-drop rule

    FirewallD creates the root INPUT chain with a default-accept policy and
    a terminal rule which rejects all packets not accepted by any prior
    rule. Any subsequent rules appended to the chain are therefore inert.
    The administrator would have to open the VXLAN UDP port to make overlay
    networks work at all, which would result in all VXLAN traffic being
    accepted and defeating our attempts to enforce encryption on encrypted
    overlay networks.
    
    Insert the rule to drop unencrypted VXLAN packets tagged for encrypted
    overlay networks at the top of the INPUT chain so that enforcement of
    mandatory encryption takes precedence over any accept rules configured
    by the administrator. Continue to append the accept rule to the bottom
    of the chain so as not to override any administrator-configured drop
    rules.
    
    Signed-off-by: Cory Snider <csnider@mirantis.com>
    (cherry picked from commit 965eda3)
    Signed-off-by: Cory Snider <csnider@mirantis.com>
    corhere committed Mar 23, 2023
    Configuration menu
    Copy the full SHA
    b87f7f1 View commit details
    Browse the repository at this point in the history

Commits on Apr 4, 2023

  1. Merge pull request from GHSA-232p-vwff-86mp

    [23.0 backport] libnetwork: ensure encryption is mandatory on encrypted overlay networks
    thaJeztah authored Apr 4, 2023
    Configuration menu
    Copy the full SHA
    59118bf View commit details
    Browse the repository at this point in the history
Loading