CVE-2024-58007 (GCVE-0-2024-58007)
Vulnerability from cvelistv5
Published
2025-02-27 02:12
Modified
2025-05-04 10:08
Severity ?
Summary
In the Linux kernel, the following vulnerability has been resolved: soc: qcom: socinfo: Avoid out of bounds read of serial number On MSM8916 devices, the serial number exposed in sysfs is constant and does not change across individual devices. It's always: db410c:/sys/devices/soc0$ cat serial_number 2644893864 The firmware used on MSM8916 exposes SOCINFO_VERSION(0, 8), which does not have support for the serial_num field in the socinfo struct. There is an existing check to avoid exposing the serial number in that case, but it's not correct: When checking the item_size returned by SMEM, we need to make sure the *end* of the serial_num is within bounds, instead of comparing with the *start* offset. The serial_number currently exposed on MSM8916 devices is just an out of bounds read of whatever comes after the socinfo struct in SMEM. Fix this by changing offsetof() to offsetofend(), so that the size of the field is also taken into account.
Impacted products
Vendor Product Version
Linux Linux Version: efb448d0a3fca01bb987dd70963da6185b81751e
Version: efb448d0a3fca01bb987dd70963da6185b81751e
Version: efb448d0a3fca01bb987dd70963da6185b81751e
Version: efb448d0a3fca01bb987dd70963da6185b81751e
Version: efb448d0a3fca01bb987dd70963da6185b81751e
Version: efb448d0a3fca01bb987dd70963da6185b81751e
Version: efb448d0a3fca01bb987dd70963da6185b81751e
Version: efb448d0a3fca01bb987dd70963da6185b81751e
Create a notification for this product.
Show details on NVD website


{
  "containers": {
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "drivers/soc/qcom/socinfo.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "7445fa05317534bbd8b373c0eff8319187916030",
              "status": "affected",
              "version": "efb448d0a3fca01bb987dd70963da6185b81751e",
              "versionType": "git"
            },
            {
              "lessThan": "2495c6598731b6d7f565140f2bd63ef4bc36ce7d",
              "status": "affected",
              "version": "efb448d0a3fca01bb987dd70963da6185b81751e",
              "versionType": "git"
            },
            {
              "lessThan": "2d09d3c9afa2fc422ac3df7c9b8534f350ee19dd",
              "status": "affected",
              "version": "efb448d0a3fca01bb987dd70963da6185b81751e",
              "versionType": "git"
            },
            {
              "lessThan": "9c88b3a3fae4d60641c3a45be66269d00eff33cd",
              "status": "affected",
              "version": "efb448d0a3fca01bb987dd70963da6185b81751e",
              "versionType": "git"
            },
            {
              "lessThan": "47470acd719d45c4c8c418c07962f74cc995652b",
              "status": "affected",
              "version": "efb448d0a3fca01bb987dd70963da6185b81751e",
              "versionType": "git"
            },
            {
              "lessThan": "407c928305c1a37232a63811c400ef616f85ccbc",
              "status": "affected",
              "version": "efb448d0a3fca01bb987dd70963da6185b81751e",
              "versionType": "git"
            },
            {
              "lessThan": "0a92feddae0634a0b87c04b19d343f6af97af700",
              "status": "affected",
              "version": "efb448d0a3fca01bb987dd70963da6185b81751e",
              "versionType": "git"
            },
            {
              "lessThan": "22cf4fae6660b6e1a583a41cbf84e3046ca9ccd0",
              "status": "affected",
              "version": "efb448d0a3fca01bb987dd70963da6185b81751e",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "drivers/soc/qcom/socinfo.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "5.4"
            },
            {
              "lessThan": "5.4",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.4.*",
              "status": "unaffected",
              "version": "5.4.291",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.10.*",
              "status": "unaffected",
              "version": "5.10.235",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.15.*",
              "status": "unaffected",
              "version": "5.15.179",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.1.*",
              "status": "unaffected",
              "version": "6.1.129",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.6.*",
              "status": "unaffected",
              "version": "6.6.78",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.12.*",
              "status": "unaffected",
              "version": "6.12.14",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.13.*",
              "status": "unaffected",
              "version": "6.13.3",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "6.14",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.4.291",
                  "versionStartIncluding": "5.4",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.10.235",
                  "versionStartIncluding": "5.4",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.15.179",
                  "versionStartIncluding": "5.4",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.1.129",
                  "versionStartIncluding": "5.4",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.6.78",
                  "versionStartIncluding": "5.4",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.12.14",
                  "versionStartIncluding": "5.4",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.13.3",
                  "versionStartIncluding": "5.4",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.14",
                  "versionStartIncluding": "5.4",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nsoc: qcom: socinfo: Avoid out of bounds read of serial number\n\nOn MSM8916 devices, the serial number exposed in sysfs is constant and does\nnot change across individual devices. It\u0027s always:\n\n  db410c:/sys/devices/soc0$ cat serial_number\n  2644893864\n\nThe firmware used on MSM8916 exposes SOCINFO_VERSION(0, 8), which does not\nhave support for the serial_num field in the socinfo struct. There is an\nexisting check to avoid exposing the serial number in that case, but it\u0027s\nnot correct: When checking the item_size returned by SMEM, we need to make\nsure the *end* of the serial_num is within bounds, instead of comparing\nwith the *start* offset. The serial_number currently exposed on MSM8916\ndevices is just an out of bounds read of whatever comes after the socinfo\nstruct in SMEM.\n\nFix this by changing offsetof() to offsetofend(), so that the size of the\nfield is also taken into account."
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2025-05-04T10:08:16.807Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/7445fa05317534bbd8b373c0eff8319187916030"
        },
        {
          "url": "https://git.kernel.org/stable/c/2495c6598731b6d7f565140f2bd63ef4bc36ce7d"
        },
        {
          "url": "https://git.kernel.org/stable/c/2d09d3c9afa2fc422ac3df7c9b8534f350ee19dd"
        },
        {
          "url": "https://git.kernel.org/stable/c/9c88b3a3fae4d60641c3a45be66269d00eff33cd"
        },
        {
          "url": "https://git.kernel.org/stable/c/47470acd719d45c4c8c418c07962f74cc995652b"
        },
        {
          "url": "https://git.kernel.org/stable/c/407c928305c1a37232a63811c400ef616f85ccbc"
        },
        {
          "url": "https://git.kernel.org/stable/c/0a92feddae0634a0b87c04b19d343f6af97af700"
        },
        {
          "url": "https://git.kernel.org/stable/c/22cf4fae6660b6e1a583a41cbf84e3046ca9ccd0"
        }
      ],
      "title": "soc: qcom: socinfo: Avoid out of bounds read of serial number",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2024-58007",
    "datePublished": "2025-02-27T02:12:03.593Z",
    "dateReserved": "2025-02-27T02:10:48.227Z",
    "dateUpdated": "2025-05-04T10:08:16.807Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.1",
  "vulnerability-lookup:meta": {
    "nvd": "{\"cve\":{\"id\":\"CVE-2024-58007\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2025-02-27T03:15:11.680\",\"lastModified\":\"2025-03-13T13:15:43.833\",\"vulnStatus\":\"Modified\",\"cveTags\":[],\"descriptions\":[{\"lang\":\"en\",\"value\":\"In the Linux kernel, the following vulnerability has been resolved:\\n\\nsoc: qcom: socinfo: Avoid out of bounds read of serial number\\n\\nOn MSM8916 devices, the serial number exposed in sysfs is constant and does\\nnot change across individual devices. It\u0027s always:\\n\\n  db410c:/sys/devices/soc0$ cat serial_number\\n  2644893864\\n\\nThe firmware used on MSM8916 exposes SOCINFO_VERSION(0, 8), which does not\\nhave support for the serial_num field in the socinfo struct. There is an\\nexisting check to avoid exposing the serial number in that case, but it\u0027s\\nnot correct: When checking the item_size returned by SMEM, we need to make\\nsure the *end* of the serial_num is within bounds, instead of comparing\\nwith the *start* offset. The serial_number currently exposed on MSM8916\\ndevices is just an out of bounds read of whatever comes after the socinfo\\nstruct in SMEM.\\n\\nFix this by changing offsetof() to offsetofend(), so that the size of the\\nfield is also taken into account.\"},{\"lang\":\"es\",\"value\":\"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: soc: qcom: socinfo: Evitar la lectura fuera de los l\u00edmites del n\u00famero de serie En los dispositivos MSM8916, el n\u00famero de serie expuesto en sysfs es constante y no cambia en los dispositivos individuales. Siempre es: db410c:/sys/devices/soc0$ cat serial_number 2644893864 El firmware utilizado en MSM8916 expone SOCINFO_VERSION(0, 8), que no tiene soporte para el campo serial_num en la estructura socinfo. Existe una comprobaci\u00f3n para evitar exponer el n\u00famero de serie en ese caso, pero no es correcta: Al comprobar el item_size devuelto por SMEM, debemos asegurarnos de que el *final* del serial_num est\u00e9 dentro de los l\u00edmites, en lugar de compararlo con el desplazamiento *inicio*. El serial_number que se expone actualmente en los dispositivos MSM8916 es simplemente una lectura fuera de l\u00edmites de lo que viene despu\u00e9s de la estructura sociinfo en SMEM. Solucione esto cambiando offsetof() a offsetofend(), de modo que tambi\u00e9n se tenga en cuenta el tama\u00f1o del campo.\"}],\"metrics\":{\"cvssMetricV31\":[{\"source\":\"nvd@nist.gov\",\"type\":\"Primary\",\"cvssData\":{\"version\":\"3.1\",\"vectorString\":\"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H\",\"baseScore\":7.1,\"baseSeverity\":\"HIGH\",\"attackVector\":\"LOCAL\",\"attackComplexity\":\"LOW\",\"privilegesRequired\":\"LOW\",\"userInteraction\":\"NONE\",\"scope\":\"UNCHANGED\",\"confidentialityImpact\":\"HIGH\",\"integrityImpact\":\"NONE\",\"availabilityImpact\":\"HIGH\"},\"exploitabilityScore\":1.8,\"impactScore\":5.2}]},\"weaknesses\":[{\"source\":\"nvd@nist.gov\",\"type\":\"Primary\",\"description\":[{\"lang\":\"en\",\"value\":\"CWE-125\"}]}],\"configurations\":[{\"nodes\":[{\"operator\":\"OR\",\"negate\":false,\"cpeMatch\":[{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\",\"versionStartIncluding\":\"5.4\",\"versionEndExcluding\":\"6.1.129\",\"matchCriteriaId\":\"654E7F30-F4AB-407B-A548-C9774836B7C8\"},{\"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/0a92feddae0634a0b87c04b19d343f6af97af700\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/22cf4fae6660b6e1a583a41cbf84e3046ca9ccd0\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/2495c6598731b6d7f565140f2bd63ef4bc36ce7d\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/2d09d3c9afa2fc422ac3df7c9b8534f350ee19dd\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/407c928305c1a37232a63811c400ef616f85ccbc\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/47470acd719d45c4c8c418c07962f74cc995652b\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/7445fa05317534bbd8b373c0eff8319187916030\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/9c88b3a3fae4d60641c3a45be66269d00eff33cd\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]}]}}"
  }
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Sightings

Author Source Type Date

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
  • Confirmed: The vulnerability is confirmed from an analyst perspective.
  • Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
  • Patched: This vulnerability was successfully patched by the user reporting the sighting.
  • Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
  • Not confirmed: The user expresses doubt about the veracity of the vulnerability.
  • Not patched: This vulnerability was not successfully patched by the user reporting the sighting.


Loading…

Loading…