← Back to CVE Explorer

CVE-2024-58017

Full vulnerability record from the local CVENow database.

Description

In the Linux kernel, the following vulnerability has been resolved: printk: Fix signed integer overflow when defining LOG_BUF_LEN_MAX Shifting 1 << 31 on a 32-bit int causes signed integer overflow, which leads to undefined behavior. To prevent this, cast 1 to u32 before performing the shift, ensuring well-defined behavior. This change explicitly avoids any potential overflow by ensuring that the shift occurs on an unsigned 32-bit integer.

Severity
MEDIUM
CVSS score
5.5 (v3.1)
Vulnerability status
Modified
Source identifier
416baaa9-dc9f-4396-8d5f-8c081fb06d67
Published
2025-02-27 03:15:12.690000
Last modified
2026-11-05 21:17:39.127000
View original CVE JSON
{
  "id": "CVE-2024-58017",
  "sourceIdentifier": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
  "published": "2025-02-27T03:15:12.690",
  "lastModified": "2026-11-05T21:17:39.127",
  "vulnStatus": "Modified",
  "cveTags": [],
  "descriptions": [
    {
      "lang": "en",
      "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nprintk: Fix signed integer overflow when defining LOG_BUF_LEN_MAX\n\nShifting 1 << 31 on a 32-bit int causes signed integer overflow, which\nleads to undefined behavior. To prevent this, cast 1 to u32 before\nperforming the shift, ensuring well-defined behavior.\n\nThis change explicitly avoids any potential overflow by ensuring that\nthe shift occurs on an unsigned 32-bit integer."
    },
    {
      "lang": "es",
      "value": "En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: printk: Se corrige el desbordamiento de entero con signo al definir LOG_BUF_LEN_MAX. El cambio de 1 &lt;&lt; 31 en un entero de 32 bits provoca un desbordamiento de entero con signo, lo que conduce a un comportamiento indefinido. Para evitarlo, convierta 1 a u32 antes de realizar el cambio, lo que garantiza un comportamiento bien definido. Este cambio evita explícitamente cualquier desbordamiento potencial al garantizar que el cambio se produzca en un entero de 32 bits sin signo."
    }
  ],
  "affected": [
    {
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
      "affectedData": [
        {
          "vendor": "Linux",
          "product": "Linux",
          "defaultStatus": "unaffected",
          "programFiles": [
            "kernel/printk/printk.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "versions": [
            {
              "version": "e6fe3e5b7d16e8f146a4ae7fe481bc6e97acde1e",
              "lessThan": "54c14022fa2ba427dc543455c2cf9225903a7174",
              "versionType": "git",
              "status": "affected"
            },
            {
              "version": "e6fe3e5b7d16e8f146a4ae7fe481bc6e97acde1e",
              "lessThan": "dfb7b179741ee09506dc7719d92f9e1cea01f10e",
              "versionType": "git",
              "status": "affected"
            },
            {
              "version": "e6fe3e5b7d16e8f146a4ae7fe481bc6e97acde1e",
              "lessThan": "bb8ff054e19fe27f4e5eaac1b05e462894cfe9b1",
              "versionType": "git",
              "status": "affected"
            },
            {
              "version": "e6fe3e5b7d16e8f146a4ae7fe481bc6e97acde1e",
              "lessThan": "9a6d43844de2479a3ff8d674c3e2a16172e01598",
              "versionType": "git",
              "status": "affected"
            },
            {
              "version": "e6fe3e5b7d16e8f146a4ae7fe481bc6e97acde1e",
              "lessThan": "4acf6bab775dbd22a9a799030a808a7305e01d63",
              "versionType": "git",
              "status": "affected"
            },
            {
              "version": "e6fe3e5b7d16e8f146a4ae7fe481bc6e97acde1e",
              "lessThan": "404e5fd918a0b14abec06c7eca128f04c9b98e41",
              "versionType": "git",
              "status": "affected"
            },
            {
              "version": "e6fe3e5b7d16e8f146a4ae7fe481bc6e97acde1e",
              "lessThan": "4a2c4e7265b8eed83c25d86d702cea06493cab18",
              "versionType": "git",
              "status": "affected"
            },
            {
              "version": "e6fe3e5b7d16e8f146a4ae7fe481bc6e97acde1e",
              "lessThan": "3d6f83df8ff2d5de84b50377e4f0d45e25311c7a",
              "versionType": "git",
              "status": "affected"
            },
            {
              "version": "55b2c1ccb82143be1ed9e1922976dbe63917fe68",
              "versionType": "git",
              "status": "affected"
            },
            {
              "version": "089d475a4cdb5848998b3cb37e545413ed054784",
              "versionType": "git",
              "status": "affected"
            },
            {
              "version": "695583334b6b7f82c39ee124edfbfa48145ed571",
              "versionType": "git",
              "status": "affected"
            },
            {
              "version": "3404019d6d0f4c0108b77d44e97e2e39ca937e6f",
              "versionType": "git",
              "status": "affected"
            },
            {
              "version": "4.4.203",
              "lessThan": "4.5",
              "versionType": "semver",
              "status": "affected"
            },
            {
              "version": "4.9.203",
              "lessThan": "4.10",
              "versionType": "semver",
              "status": "affected"
            },
            {
              "version": "4.14.156",
              "lessThan": "4.15",
              "versionType": "semver",
              "status": "affected"
            },
            {
              "version": "4.19.86",
              "lessThan": "4.20",
              "versionType": "semver",
              "status": "affected"
            }
          ]
        },
        {
          "vendor": "Linux",
          "product": "Linux",
          "defaultStatus": "affected",
          "programFiles": [
            "kernel/printk/printk.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "versions": [
            {
              "version": "4.20",
              "status": "affected"
            },
            {
              "version": "0",
              "lessThan": "4.20",
              "versionType": "semver",
              "status": "unaffected"
            },
            {
              "version": "5.4.291",
              "lessThanOrEqual": "5.4.*",
              "versionType": "semver",
              "status": "unaffected"
            },
            {
              "version": "5.10.235",
              "lessThanOrEqual": "5.10.*",
              "versionType": "semver",
              "status": "unaffected"
            },
            {
              "version": "5.15.179",
              "lessThanOrEqual": "5.15.*",
              "versionType": "semver",
              "status": "unaffected"
            },
            {
              "version": "6.1.129",
              "lessThanOrEqual": "6.1.*",
              "versionType": "semver",
              "status": "unaffected"
            },
            {
              "version": "6.6.78",
              "lessThanOrEqual": "6.6.*",
              "versionType": "semver",
              "status": "unaffected"
            },
            {
              "version": "6.12.14",
              "lessThanOrEqual": "6.12.*",
              "versionType": "semver",
              "status": "unaffected"
            },
            {
              "version": "6.13.3",
              "lessThanOrEqual": "6.13.*",
              "versionType": "semver",
              "status": "unaffected"
            },
            {
              "version": "6.14",
              "lessThanOrEqual": "*",
              "versionType": "original_commit_for_fix",
              "status": "unaffected"
            }
          ]
        }
      ]
    },
    {
      "source": "0b142b55-0307-4c5a-b3c9-f314f3fb7c5e",
      "affectedData": [
        {
          "vendor": "Siemens",
          "product": "SIMATIC S7-1500 TM MFP - GNU/Linux subsystem",
          "defaultStatus": "unknown",
          "versions": [
            {
              "version": "0",
              "lessThan": "*",
              "versionType": "custom",
              "status": "affected"
            }
          ]
        },
        {
          "vendor": "Siemens",
          "product": "SIMATIC S7-1500 TM MFP - GNU/Linux subsystem",
          "defaultStatus": "unknown",
          "versions": [
            {
              "version": "0",
              "lessThan": "*",
              "versionType": "custom",
              "status": "affected"
            }
          ]
        }
      ]
    }
  ],
  "metrics": {
    "cvssMetricV31": [
      {
        "source": "[email protected]",
        "type": "Primary",
        "cvssData": {
          "version": "3.1",
          "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H",
          "baseScore": 5.5,
          "baseSeverity": "MEDIUM",
          "attackVector": "LOCAL",
          "attackComplexity": "LOW",
          "privilegesRequired": "LOW",
          "userInteraction": "NONE",
          "scope": "UNCHANGED",
          "confidentialityImpact": "NONE",
          "integrityImpact": "NONE",
          "availabilityImpact": "HIGH"
        },
        "exploitabilityScore": 1.8,
        "impactScore": 3.6
      }
    ],
    "ssvcV203": [
      {
        "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
        "ssvcData": {
          "timestamp": "2026-11-05T20:33:09.622055Z",
          "id": "CVE-2024-58017",
          "options": [
            {
              "exploitation": "none"
            },
            {
              "automatable": "no"
            },
            {
              "technicalImpact": "partial"
            }
          ],
          "role": "CISA Coordinator",
          "version": "2.0.3"
        }
      }
    ]
  },
  "weaknesses": [
    {
      "source": "[email protected]",
      "type": "Primary",
      "description": [
        {
          "lang": "en",
          "value": "CWE-190"
        }
      ]
    }
  ],
  "configurations": [
    {
      "nodes": [
        {
          "operator": "OR",
          "negate": false,
          "cpeMatch": [
            {
              "vulnerable": true,
              "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
              "versionEndExcluding": "6.1.129",
              "matchCriteriaId": "18BF0B0B-D95C-472C-A99F-DE209F253F6F"
            },
            {
              "vulnerable": true,
              "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
              "versionStartIncluding": "6.2",
              "versionEndExcluding": "6.6.78",
              "matchCriteriaId": "0C58261F-EDFB-4A12-8CCD-F12101482030"
            },
            {
              "vulnerable": true,
              "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
              "versionStartIncluding": "6.7",
              "versionEndExcluding": "6.12.14",
              "matchCriteriaId": "033BB7EE-C9A2-45EA-BAC9-87BB9D951BCD"
            },
            {
              "vulnerable": true,
              "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
              "versionStartIncluding": "6.13",
              "versionEndExcluding": "6.13.3",
              "matchCriteriaId": "0E92CEE3-1FC3-4AFC-A513-DEDBA7414F00"
            }
          ]
        }
      ]
    }
  ],
  "references": [
    {
      "url": "https://git.kernel.org/stable/c/3d6f83df8ff2d5de84b50377e4f0d45e25311c7a",
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
      "tags": [
        "Patch"
      ]
    },
    {
      "url": "https://git.kernel.org/stable/c/404e5fd918a0b14abec06c7eca128f04c9b98e41",
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
      "tags": [
        "Patch"
      ]
    },
    {
      "url": "https://git.kernel.org/stable/c/4a2c4e7265b8eed83c25d86d702cea06493cab18",
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
      "tags": [
        "Patch"
      ]
    },
    {
      "url": "https://git.kernel.org/stable/c/4acf6bab775dbd22a9a799030a808a7305e01d63",
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
      "tags": [
        "Patch"
      ]
    },
    {
      "url": "https://git.kernel.org/stable/c/54c14022fa2ba427dc543455c2cf9225903a7174",
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
    },
    {
      "url": "https://git.kernel.org/stable/c/9a6d43844de2479a3ff8d674c3e2a16172e01598",
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
      "tags": [
        "Patch"
      ]
    },
    {
      "url": "https://git.kernel.org/stable/c/bb8ff054e19fe27f4e5eaac1b05e462894cfe9b1",
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
    },
    {
      "url": "https://git.kernel.org/stable/c/dfb7b179741ee09506dc7719d92f9e1cea01f10e",
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
    },
    {
      "url": "https://lists.debian.org/debian-lts-announce/2025/03/msg00028.html",
      "source": "af854a3a-2127-422b-91ae-364da2661108"
    },
    {
      "url": "https://lists.debian.org/debian-lts-announce/2025/05/msg00030.html",
      "source": "af854a3a-2127-422b-91ae-364da2661108"
    },
    {
      "url": "https://cert-portal.siemens.com/productcert/html/ssa-265688.html",
      "source": "0b142b55-0307-4c5a-b3c9-f314f3fb7c5e"
    },
    {
      "url": "https://cert-portal.siemens.com/productcert/html/ssa-784472.html",
      "source": "0b142b55-0307-4c5a-b3c9-f314f3fb7c5e"
    }
  ]
}