CVE-2021-47266

Source
https://cve.org/CVERecord?id=CVE-2021-47266
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-47266.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2021-47266
Downstream
Published
2024-05-21T15:15:15.213Z
Modified
2026-03-15T22:43:09.566575Z
Severity
  • 5.5 (Medium) CVSS_V3 - CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H CVSS Calculator
Summary
[none]
Details

In the Linux kernel, the following vulnerability has been resolved:

RDMA/ipoib: Fix warning caused by destroying non-initial netns

After the commit 5ce2dced8e95 ("RDMA/ipoib: Set rtnllinkops for ipoib interfaces"), if the IPoIB device is moved to non-initial netns, destroying that netns lets the device vanish instead of moving it back to the initial netns, This is happening because defaultdeviceexit() skips the interfaces due to having rtnllinkops set.

Steps to reporoduce: ip netns add foo ip link set mlx5_ib0 netns foo ip netns delete foo

WARNING: CPU: 1 PID: 704 at net/core/dev.c:11435 netdevexit+0x3f/0x50 Modules linked in: xtCHECKSUM xtMASQUERADE xtconntrack iptREJECT nfrejectipv4 nftcompat nftcounter nftchainnat nfnat nfconntrack nfdefragipv6 nfdefragipv4 nftables nfnetlink tun d fuse CPU: 1 PID: 704 Comm: kworker/u64:3 Tainted: G S W 5.13.0-rc1+ #1 Hardware name: Dell Inc. PowerEdge R630/02C2CP, BIOS 2.1.5 04/11/2016 Workqueue: netns cleanupnet RIP: 0010:netdevexit+0x3f/0x50 Code: 48 8b bb 30 01 00 00 e8 ef 81 b1 ff 48 81 fb c0 3a 54 a1 74 13 48 8b 83 90 00 00 00 48 81 c3 90 00 00 00 48 39 d8 75 02 5b c3 <0f> 0b 5b c3 66 66 2e 0f 1f 84 00 00 00 00 00 66 90 0f 1f 44 00 RSP: 0018:ffffb297079d7e08 EFLAGS: 00010206 RAX: ffff8eb542c00040 RBX: ffff8eb541333150 RCX: 000000008010000d RDX: 000000008010000e RSI: 000000008010000d RDI: ffff8eb440042c00 RBP: ffffb297079d7e48 R08: 0000000000000001 R09: ffffffff9fdeac00 R10: ffff8eb5003be000 R11: 0000000000000001 R12: ffffffffa1545620 R13: ffffffffa1545628 R14: 0000000000000000 R15: ffffffffa1543b20 FS: 0000000000000000(0000) GS:ffff8ed37fa00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00005601b5f4c2e8 CR3: 0000001fc8c10002 CR4: 00000000003706e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: opsexitlist.isra.9+0x36/0x70 cleanupnet+0x234/0x390 processonework+0x1cb/0x360 ? processonework+0x360/0x360 workerthread+0x30/0x370 ? processonework+0x360/0x360 kthread+0x116/0x130 ? kthreadpark+0x80/0x80 retfrom_fork+0x22/0x30

To avoid the above warning and later on the kernel panic that could happen on shutdown due to a NULL pointer dereference, make sure to set the netns_refund flag that was introduced by commit 3a5ca857079e ("can: dev: Move device back to init netns on owning netns delete") to properly restore the IPoIB interfaces to the initial netns.

References

Affected packages

Git /

Affected ranges

Database specific

unresolved_ranges
[
    {
        "events": [
            {
                "introduced": "5.4.73"
            },
            {
                "fixed": "5.4.126"
            }
        ]
    },
    {
        "events": [
            {
                "introduced": "5.8.17"
            },
            {
                "fixed": "5.9"
            }
        ]
    },
    {
        "events": [
            {
                "introduced": "5.9.2"
            },
            {
                "fixed": "5.10"
            }
        ]
    },
    {
        "events": [
            {
                "introduced": "5.10"
            },
            {
                "fixed": "5.10.44"
            }
        ]
    },
    {
        "events": [
            {
                "introduced": "5.11"
            },
            {
                "fixed": "5.12.11"
            }
        ]
    },
    {
        "events": [
            {
                "introduced": "0"
            },
            {
                "last_affected": "5.13-rc1"
            }
        ]
    },
    {
        "events": [
            {
                "introduced": "0"
            },
            {
                "last_affected": "5.13-rc2"
            }
        ]
    },
    {
        "events": [
            {
                "introduced": "0"
            },
            {
                "last_affected": "5.13-rc3"
            }
        ]
    },
    {
        "events": [
            {
                "introduced": "0"
            },
            {
                "last_affected": "5.13-rc4"
            }
        ]
    },
    {
        "events": [
            {
                "introduced": "0"
            },
            {
                "last_affected": "5.13-rc5"
            }
        ]
    }
]
source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-47266.json"