Skip to content
Heist/ feed
Back to feed
UnratedFix available

net: mdio: unexport __init-annotated mdio_bus_init()

Type: advisorySources: OSV

In the Linux kernel, the following vulnerability has been resolved: net: mdio: unexport __init-annotated mdio_bus_init() EXPORT_SYMBOL and __init is a bad combination because the .init.text section is freed up after the initialization. Hence, modules cannot use symbols annotated __init. The access to a freed symbol may end up with kernel panic. modpost used to detect it, but it has been broken for a decade. Recently, I fixed modpost so it started to warn it again, then this showed up in linux-next builds. There are two ways to fix it: - Remove __init - Remove EXPORT_SYMBOL I chose the latter for this case because the only in-tree call-site, drivers/net/phy/phy_device.c is never compiled as modular. (CONFIG_PHYLIB is boolean)

Products
Kernel
Affected versions
Not specified
Fixed versions
4.14.283, 4.19.247, 5.10.122, 5.15.47, 5.17.15, 5.18.4, 5.4.198
CVEs
CVE-2022-49350
Confirmed fixed CVEs
Not specified
Updated in this feed
6 Nov 2026, 18:33 UTC · Revision 1

Source evidence

net: mdio: unexport __init-annotated mdio_bus_init()

core-osv · Original source

Published 26 Feb 2025, 02:11 UTC

In the Linux kernel, the following vulnerability has been resolved: net: mdio: unexport __init-annotated mdio_bus_init() EXPORT_SYMBOL and __init is a bad combination because the .init.text section is freed up after the initialization. Hence, modules cannot use symbols annotated __init. The access to a freed symbol may end up with kernel panic. modpost used to detect it, but it has been broken for a decade. Recently, I fixed modpost so it started to warn it again, then this showed up in linux-next builds. There are two ways to fix it: - Remove __init - Remove EXPORT_SYMBOL I chose the latter for this case because the only in-tree call-site, drivers/net/phy/phy_device.c is never compiled as modular. (CONFIG_PHYLIB is boolean)

osv:CVE-2022-49350

Kernel

Fixed versions: 4.14.283, 4.19.247, 5.4.198, 5.10.122, 5.15.47, 5.17.15, 5.18.4

Complete source record
{
  "id": "24e461bb8e5e3126c6691e24dd1994c582af65093dce9f829bdfd6cbe3cd2d63",
  "url": "https://osv.dev/vulnerability/CVE-2022-49350",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "net: mdio: unexport __init-annotated mdio_bus_init()",
    "summary": "In the Linux kernel, the following vulnerability has been resolved: net: mdio: unexport __init-annotated mdio_bus_init() EXPORT_SYMBOL and __init is a bad combination because the .init.text section is freed up after the initialization. Hence, modules cannot use symbols annotated __init. The access to a freed symbol may end up with kernel panic. modpost used to detect it, but it has been broken for a decade. Recently, I fixed modpost so it started to warn it again, then this showed up in linux-next builds. There are two ways to fix it: - Remove __init - Remove EXPORT_SYMBOL I chose the latter for this case because the only in-tree call-site, drivers/net/phy/phy_device.c is never compiled as modular. (CONFIG_PHYLIB is boolean)",
    "evidence": "osv:CVE-2022-49350",
    "products": [
      {
        "name": {
          "value": "Kernel",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "4.14.283",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "4.19.247",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "5.4.198",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "5.10.122",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "5.15.47",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "5.17.15",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "5.18.4",
            "evidence": "/affected/1/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "unknown",
    "structured": {
      "id": "CVE-2022-49350",
      "aliases": [
        "CVE-2022-49350"
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "90eff9096c01ba90cdae504a6b95ee87fe2556a3"
                },
                {
                  "fixed": "ab64ec2c75683f30ccde9eaaf0761002f901aa12"
                },
                {
                  "fixed": "5534bcd7c40299862237c4a8fd9c5031b3db1538"
                },
                {
                  "fixed": "6a90a44d53428a3bf01bd80df9ba78b19959270c"
                },
                {
                  "fixed": "7759c3222815b945a94b212bc0c6cdec475cfec2"
                },
                {
                  "fixed": "59fa94cddf9eef8d8dae587373eed8b8f4eb11d7"
                },
                {
                  "fixed": "f5c68137f1191ba3fcf6260ec71b30be2e2bf4c3"
                },
                {
                  "fixed": "f2f0f8c18b60ca64ff50892ed899cf1c77864755"
                },
                {
                  "fixed": "35b42dce619701f1300fb8498dae82c9bb1f0263"
                }
              ]
            }
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-49350.json"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "4.12.0"
                },
                {
                  "fixed": "4.14.283"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "4.15.0"
                },
                {
                  "fixed": "4.19.247"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "4.20.0"
                },
                {
                  "fixed": "5.4.198"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.5.0"
                },
                {
                  "fixed": "5.10.122"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.11.0"
                },
                {
                  "fixed": "5.15.47"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.16.0"
                },
                {
                  "fixed": "5.17.15"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.18.0"
                },
                {
                  "fixed": "5.18.4"
                }
              ]
            }
          ],
          "package": {
            "name": "Kernel",
            "ecosystem": "Linux"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-49350.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:47.913682790Z",
      "provider": "osv",
      "references": [
        "https://git.kernel.org/stable/c/35b42dce619701f1300fb8498dae82c9bb1f0263",
        "https://git.kernel.org/stable/c/5534bcd7c40299862237c4a8fd9c5031b3db1538",
        "https://git.kernel.org/stable/c/59fa94cddf9eef8d8dae587373eed8b8f4eb11d7",
        "https://git.kernel.org/stable/c/6a90a44d53428a3bf01bd80df9ba78b19959270c",
        "https://git.kernel.org/stable/c/7759c3222815b945a94b212bc0c6cdec475cfec2",
        "https://git.kernel.org/stable/c/ab64ec2c75683f30ccde9eaaf0761002f901aa12",
        "https://git.kernel.org/stable/c/f2f0f8c18b60ca64ff50892ed899cf1c77864755",
        "https://git.kernel.org/stable/c/f5c68137f1191ba3fcf6260ec71b30be2e2bf4c3",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/49xxx/CVE-2022-49350.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2022-49350",
        "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
      ],
      "provider_metadata": {
        "cna_assigner": "Linux",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/49xxx/CVE-2022-49350.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2022-49350",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": null
  },
  "source_id": "core-osv",
  "document_id": 515888,
  "published_at": "2025-02-26T02:11:03.514+00:00"
}