cve-2024-46793
Vulnerability from cvelistv5
Published
2024-09-18 07:12
Modified
2024-12-19 09:23
Severity ?
EPSS score ?
Summary
In the Linux kernel, the following vulnerability has been resolved:
ASoC: Intel: Boards: Fix NULL pointer deref in BYT/CHT boards harder
Since commit 13f58267cda3 ("ASoC: soc.h: don't create dummy Component
via COMP_DUMMY()") dummy codecs declared like this:
SND_SOC_DAILINK_DEF(dummy,
DAILINK_COMP_ARRAY(COMP_DUMMY()));
expand to:
static struct snd_soc_dai_link_component dummy[] = {
};
Which means that dummy is a zero sized array and thus dais[i].codecs should
not be dereferenced *at all* since it points to the address of the next
variable stored in the data section as the "dummy" variable has an address
but no size, so even dereferencing dais[0] is already an out of bounds
array reference.
Which means that the if (dais[i].codecs->name) check added in
commit 7d99a70b6595 ("ASoC: Intel: Boards: Fix NULL pointer deref
in BYT/CHT boards") relies on that the part of the next variable which
the name member maps to just happens to be NULL.
Which apparently so far it usually is, except when it isn't
and then it results in crashes like this one:
[ 28.795659] BUG: unable to handle page fault for address: 0000000000030011
...
[ 28.795780] Call Trace:
[ 28.795787] <TASK>
...
[ 28.795862] ? strcmp+0x18/0x40
[ 28.795872] 0xffffffffc150c605
[ 28.795887] platform_probe+0x40/0xa0
...
[ 28.795979] ? __pfx_init_module+0x10/0x10 [snd_soc_sst_bytcr_wm5102]
Really fix things this time around by checking dais.num_codecs != 0.
References
Impacted products
{ "containers": { "adp": [ { "metrics": [ { "other": { "content": { "id": "CVE-2024-46793", "options": [ { "Exploitation": "none" }, { "Automatable": "no" }, { "Technical Impact": "partial" } ], "role": "CISA Coordinator", "timestamp": "2024-09-29T14:23:21.765056Z", "version": "2.0.3" }, "type": "ssvc" } } ], "providerMetadata": { "dateUpdated": "2024-09-29T14:23:33.455Z", "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "shortName": "CISA-ADP" }, "title": "CISA ADP Vulnrichment" } ], "cna": { "affected": [ { "defaultStatus": "unaffected", "product": "Linux", "programFiles": [ "sound/soc/intel/boards/bxt_rt298.c", "sound/soc/intel/boards/bytcht_cx2072x.c", "sound/soc/intel/boards/bytcht_da7213.c", "sound/soc/intel/boards/bytcht_es8316.c", "sound/soc/intel/boards/bytcr_rt5640.c", "sound/soc/intel/boards/bytcr_rt5651.c", "sound/soc/intel/boards/bytcr_wm5102.c", "sound/soc/intel/boards/cht_bsw_rt5645.c", "sound/soc/intel/boards/cht_bsw_rt5672.c" ], "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git", "vendor": "Linux", "versions": [ { "lessThan": "85cda5b040bda9c577b34eb72d5b2e5b7e31985c", "status": "affected", "version": "7d99a70b65951108d82e1618c67abe69c3ed7720", "versionType": "git" }, { "lessThan": "0cc65482f5b03ac2b1c240bc34665e43ea2d71bb", "status": "affected", "version": "7d99a70b65951108d82e1618c67abe69c3ed7720", "versionType": "git" } ] }, { "defaultStatus": "affected", "product": "Linux", "programFiles": [ "sound/soc/intel/boards/bxt_rt298.c", "sound/soc/intel/boards/bytcht_cx2072x.c", "sound/soc/intel/boards/bytcht_da7213.c", "sound/soc/intel/boards/bytcht_es8316.c", "sound/soc/intel/boards/bytcr_rt5640.c", "sound/soc/intel/boards/bytcr_rt5651.c", "sound/soc/intel/boards/bytcr_wm5102.c", "sound/soc/intel/boards/cht_bsw_rt5645.c", "sound/soc/intel/boards/cht_bsw_rt5672.c" ], "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git", "vendor": "Linux", "versions": [ { "status": "affected", "version": "6.8" }, { "lessThan": "6.8", "status": "unaffected", "version": "0", "versionType": "semver" }, { "lessThanOrEqual": "6.10.*", "status": "unaffected", "version": "6.10.10", "versionType": "semver" }, { "lessThanOrEqual": "*", "status": "unaffected", "version": "6.11", "versionType": "original_commit_for_fix" } ] } ], "descriptions": [ { "lang": "en", "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nASoC: Intel: Boards: Fix NULL pointer deref in BYT/CHT boards harder\n\nSince commit 13f58267cda3 (\"ASoC: soc.h: don\u0027t create dummy Component\nvia COMP_DUMMY()\") dummy codecs declared like this:\n\nSND_SOC_DAILINK_DEF(dummy,\n DAILINK_COMP_ARRAY(COMP_DUMMY()));\n\nexpand to:\n\nstatic struct snd_soc_dai_link_component dummy[] = {\n};\n\nWhich means that dummy is a zero sized array and thus dais[i].codecs should\nnot be dereferenced *at all* since it points to the address of the next\nvariable stored in the data section as the \"dummy\" variable has an address\nbut no size, so even dereferencing dais[0] is already an out of bounds\narray reference.\n\nWhich means that the if (dais[i].codecs-\u003ename) check added in\ncommit 7d99a70b6595 (\"ASoC: Intel: Boards: Fix NULL pointer deref\nin BYT/CHT boards\") relies on that the part of the next variable which\nthe name member maps to just happens to be NULL.\n\nWhich apparently so far it usually is, except when it isn\u0027t\nand then it results in crashes like this one:\n\n[ 28.795659] BUG: unable to handle page fault for address: 0000000000030011\n...\n[ 28.795780] Call Trace:\n[ 28.795787] \u003cTASK\u003e\n...\n[ 28.795862] ? strcmp+0x18/0x40\n[ 28.795872] 0xffffffffc150c605\n[ 28.795887] platform_probe+0x40/0xa0\n...\n[ 28.795979] ? __pfx_init_module+0x10/0x10 [snd_soc_sst_bytcr_wm5102]\n\nReally fix things this time around by checking dais.num_codecs != 0." } ], "providerMetadata": { "dateUpdated": "2024-12-19T09:23:15.862Z", "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "shortName": "Linux" }, "references": [ { "url": "https://git.kernel.org/stable/c/85cda5b040bda9c577b34eb72d5b2e5b7e31985c" }, { "url": "https://git.kernel.org/stable/c/0cc65482f5b03ac2b1c240bc34665e43ea2d71bb" } ], "title": "ASoC: Intel: Boards: Fix NULL pointer deref in BYT/CHT boards harder", "x_generator": { "engine": "bippy-5f407fcff5a0" } } }, "cveMetadata": { "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "assignerShortName": "Linux", "cveId": "CVE-2024-46793", "datePublished": "2024-09-18T07:12:48.283Z", "dateReserved": "2024-09-11T15:12:18.279Z", "dateUpdated": "2024-12-19T09:23:15.862Z", "state": "PUBLISHED" }, "dataType": "CVE_RECORD", "dataVersion": "5.1", "vulnerability-lookup:meta": { "nvd": "{\"cve\":{\"id\":\"CVE-2024-46793\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2024-09-18T08:15:06.177\",\"lastModified\":\"2024-09-24T16:00:17.977\",\"vulnStatus\":\"Analyzed\",\"cveTags\":[],\"descriptions\":[{\"lang\":\"en\",\"value\":\"In the Linux kernel, the following vulnerability has been resolved:\\n\\nASoC: Intel: Boards: Fix NULL pointer deref in BYT/CHT boards harder\\n\\nSince commit 13f58267cda3 (\\\"ASoC: soc.h: don\u0027t create dummy Component\\nvia COMP_DUMMY()\\\") dummy codecs declared like this:\\n\\nSND_SOC_DAILINK_DEF(dummy,\\n DAILINK_COMP_ARRAY(COMP_DUMMY()));\\n\\nexpand to:\\n\\nstatic struct snd_soc_dai_link_component dummy[] = {\\n};\\n\\nWhich means that dummy is a zero sized array and thus dais[i].codecs should\\nnot be dereferenced *at all* since it points to the address of the next\\nvariable stored in the data section as the \\\"dummy\\\" variable has an address\\nbut no size, so even dereferencing dais[0] is already an out of bounds\\narray reference.\\n\\nWhich means that the if (dais[i].codecs-\u003ename) check added in\\ncommit 7d99a70b6595 (\\\"ASoC: Intel: Boards: Fix NULL pointer deref\\nin BYT/CHT boards\\\") relies on that the part of the next variable which\\nthe name member maps to just happens to be NULL.\\n\\nWhich apparently so far it usually is, except when it isn\u0027t\\nand then it results in crashes like this one:\\n\\n[ 28.795659] BUG: unable to handle page fault for address: 0000000000030011\\n...\\n[ 28.795780] Call Trace:\\n[ 28.795787] \u003cTASK\u003e\\n...\\n[ 28.795862] ? strcmp+0x18/0x40\\n[ 28.795872] 0xffffffffc150c605\\n[ 28.795887] platform_probe+0x40/0xa0\\n...\\n[ 28.795979] ? __pfx_init_module+0x10/0x10 [snd_soc_sst_bytcr_wm5102]\\n\\nReally fix things this time around by checking dais.num_codecs != 0.\"},{\"lang\":\"es\",\"value\":\"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: ASoC: Intel: Placas: Arreglar la desreferenciaci\u00f3n del puntero NULL en las placas BYT/CHT de forma m\u00e1s dif\u00edcil Desde el commit 13f58267cda3 (\\\"ASoC: soc.h: no crear un componente ficticio mediante COMP_DUMMY()\\\"), los c\u00f3decs ficticios se declaran de esta manera: SND_SOC_DAILINK_DEF(dummy, DAILINK_COMP_ARRAY(COMP_DUMMY())); expandir a: static struct snd_soc_dai_link_component dummy[] = { }; Lo que significa que dummy es una matriz de tama\u00f1o cero y, por lo tanto, dais[i].codecs no deber\u00eda desreferenciarse *en absoluto*, ya que apunta a la direcci\u00f3n de la siguiente variable almacenada en la secci\u00f3n de datos, ya que la variable \\\"ficticia\\\" tiene una direcci\u00f3n pero no un tama\u00f1o, por lo que incluso desreferenciar dais[0] ya es una referencia de matriz fuera de l\u00edmites. Esto significa que la comprobaci\u00f3n if (dais[i].codecs-\u0026gt;name) a\u00f1adida en el commit 7d99a70b6595 (\\\"ASoC: Intel: Boards: Fix NULL pointer deref in BYT/CHT boards\\\") se basa en que la parte de la siguiente variable a la que se asigna el miembro name resulta ser NULL. Lo que aparentemente hasta ahora suele ser as\u00ed, excepto cuando no lo es y entonces da como resultado fallos como este: [ 28.795659] ERROR: no se puede gestionar la falla de p\u00e1gina para la direcci\u00f3n: 0000000000030011 ... [ 28.795780] Seguimiento de llamadas: [ 28.795787] ... [ 28.795862] ? strcmp+0x18/0x40 [ 28.795872] 0xffffffffc150c605 [ 28.795887] platform_probe+0x40/0xa0 ... [ 28.795979] ? __pfx_init_module+0x10/0x10 [snd_soc_sst_bytcr_wm5102] Esta vez realmente solucione las cosas comprobando que dais.num_codecs != 0.\"}],\"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: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}]},\"weaknesses\":[{\"source\":\"nvd@nist.gov\",\"type\":\"Primary\",\"description\":[{\"lang\":\"en\",\"value\":\"CWE-476\"}]}],\"configurations\":[{\"nodes\":[{\"operator\":\"OR\",\"negate\":false,\"cpeMatch\":[{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\",\"versionStartIncluding\":\"6.8\",\"versionEndExcluding\":\"6.10.10\",\"matchCriteriaId\":\"4FAFFECB-D55B-4130-801C-AE52B8A6B1BA\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:6.11:rc1:*:*:*:*:*:*\",\"matchCriteriaId\":\"8B3CE743-2126-47A3-8B7C-822B502CF119\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:6.11:rc2:*:*:*:*:*:*\",\"matchCriteriaId\":\"4DEB27E7-30AA-45CC-8934-B89263EF3551\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:6.11:rc3:*:*:*:*:*:*\",\"matchCriteriaId\":\"E0005AEF-856E-47EB-BFE4-90C46899394D\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:6.11:rc4:*:*:*:*:*:*\",\"matchCriteriaId\":\"39889A68-6D34-47A6-82FC-CD0BF23D6754\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:6.11:rc5:*:*:*:*:*:*\",\"matchCriteriaId\":\"B8383ABF-1457-401F-9B61-EE50F4C61F4F\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:6.11:rc6:*:*:*:*:*:*\",\"matchCriteriaId\":\"B77A9280-37E6-49AD-B559-5B23A3B1DC3D\"}]}]}],\"references\":[{\"url\":\"https://git.kernel.org/stable/c/0cc65482f5b03ac2b1c240bc34665e43ea2d71bb\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/85cda5b040bda9c577b34eb72d5b2e5b7e31985c\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]}]}}" } }
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.