cve-2022-48857
Vulnerability from cvelistv5
Published
2024-07-16 12:25
Modified
2024-11-04 12:17
Severity ?
EPSS score ?
Summary
NFC: port100: fix use-after-free in port100_send_complete
References
Impacted products
{ "containers": { "adp": [ { "providerMetadata": { "dateUpdated": "2024-08-03T15:25:01.611Z", "orgId": "af854a3a-2127-422b-91ae-364da2661108", "shortName": "CVE" }, "references": [ { "tags": [ "x_transferred" ], "url": "https://git.kernel.org/stable/c/205c4ec78e71cbf561794e6043da80e7bae6790f" }, { "tags": [ "x_transferred" ], "url": "https://git.kernel.org/stable/c/32e866ae5a7af590597ef4bcff8451bf96d5f980" }, { "tags": [ "x_transferred" ], "url": "https://git.kernel.org/stable/c/b1db33d4e54bc35d8db96ce143ea0ef92e23d58e" }, { "tags": [ "x_transferred" ], "url": "https://git.kernel.org/stable/c/cd2a5c0da0d1ddf11d1f84e9c9b1949f50f6e161" }, { "tags": [ "x_transferred" ], "url": "https://git.kernel.org/stable/c/2b1c85f56512d49e43bc53741fce2f508cd90029" }, { "tags": [ "x_transferred" ], "url": "https://git.kernel.org/stable/c/0e721b8f2ee5e11376dd55363f9ccb539d754b8a" }, { "tags": [ "x_transferred" ], "url": "https://git.kernel.org/stable/c/7194737e1be8fdc89d2a9382bd2f371f7ee2eda8" }, { "tags": [ "x_transferred" ], "url": "https://git.kernel.org/stable/c/f80cfe2f26581f188429c12bd937eb905ad3ac7b" } ], "title": "CVE Program Container" }, { "metrics": [ { "other": { "content": { "id": "CVE-2022-48857", "options": [ { "Exploitation": "none" }, { "Automatable": "no" }, { "Technical Impact": "partial" } ], "role": "CISA Coordinator", "timestamp": "2024-09-10T16:25:46.032763Z", "version": "2.0.3" }, "type": "ssvc" } } ], "providerMetadata": { "dateUpdated": "2024-09-11T17:34:07.859Z", "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "shortName": "CISA-ADP" }, "title": "CISA ADP Vulnrichment" } ], "cna": { "affected": [ { "defaultStatus": "unaffected", "product": "Linux", "programFiles": [ "drivers/nfc/port100.c" ], "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git", "vendor": "Linux", "versions": [ { "lessThan": "205c4ec78e71", "status": "affected", "version": "0347a6ab300a", "versionType": "git" }, { "lessThan": "32e866ae5a7a", "status": "affected", "version": "0347a6ab300a", "versionType": "git" }, { "lessThan": "b1db33d4e54b", "status": "affected", "version": "0347a6ab300a", "versionType": "git" }, { "lessThan": "cd2a5c0da0d1", "status": "affected", "version": "0347a6ab300a", "versionType": "git" }, { "lessThan": "2b1c85f56512", "status": "affected", "version": "0347a6ab300a", "versionType": "git" }, { "lessThan": "0e721b8f2ee5", "status": "affected", "version": "0347a6ab300a", "versionType": "git" }, { "lessThan": "7194737e1be8", "status": "affected", "version": "0347a6ab300a", "versionType": "git" }, { "lessThan": "f80cfe2f2658", "status": "affected", "version": "0347a6ab300a", "versionType": "git" } ] }, { "defaultStatus": "affected", "product": "Linux", "programFiles": [ "drivers/nfc/port100.c" ], "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git", "vendor": "Linux", "versions": [ { "status": "affected", "version": "3.13" }, { "lessThan": "3.13", "status": "unaffected", "version": "0", "versionType": "semver" }, { "lessThanOrEqual": "4.9.*", "status": "unaffected", "version": "4.9.307", "versionType": "semver" }, { "lessThanOrEqual": "4.14.*", "status": "unaffected", "version": "4.14.272", "versionType": "semver" }, { "lessThanOrEqual": "4.19.*", "status": "unaffected", "version": "4.19.235", "versionType": "semver" }, { "lessThanOrEqual": "5.4.*", "status": "unaffected", "version": "5.4.185", "versionType": "semver" }, { "lessThanOrEqual": "5.10.*", "status": "unaffected", "version": "5.10.106", "versionType": "semver" }, { "lessThanOrEqual": "5.15.*", "status": "unaffected", "version": "5.15.29", "versionType": "semver" }, { "lessThanOrEqual": "5.16.*", "status": "unaffected", "version": "5.16.15", "versionType": "semver" }, { "lessThanOrEqual": "*", "status": "unaffected", "version": "5.17", "versionType": "original_commit_for_fix" } ] } ], "descriptions": [ { "lang": "en", "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nNFC: port100: fix use-after-free in port100_send_complete\n\nSyzbot reported UAF in port100_send_complete(). The root case is in\nmissing usb_kill_urb() calls on error handling path of -\u003eprobe function.\n\nport100_send_complete() accesses devm allocated memory which will be\nfreed on probe failure. We should kill this urbs before returning an\nerror from probe function to prevent reported use-after-free\n\nFail log:\n\nBUG: KASAN: use-after-free in port100_send_complete+0x16e/0x1a0 drivers/nfc/port100.c:935\nRead of size 1 at addr ffff88801bb59540 by task ksoftirqd/2/26\n...\nCall Trace:\n \u003cTASK\u003e\n __dump_stack lib/dump_stack.c:88 [inline]\n dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106\n print_address_description.constprop.0.cold+0x8d/0x303 mm/kasan/report.c:255\n __kasan_report mm/kasan/report.c:442 [inline]\n kasan_report.cold+0x83/0xdf mm/kasan/report.c:459\n port100_send_complete+0x16e/0x1a0 drivers/nfc/port100.c:935\n __usb_hcd_giveback_urb+0x2b0/0x5c0 drivers/usb/core/hcd.c:1670\n\n...\n\nAllocated by task 1255:\n kasan_save_stack+0x1e/0x40 mm/kasan/common.c:38\n kasan_set_track mm/kasan/common.c:45 [inline]\n set_alloc_info mm/kasan/common.c:436 [inline]\n ____kasan_kmalloc mm/kasan/common.c:515 [inline]\n ____kasan_kmalloc mm/kasan/common.c:474 [inline]\n __kasan_kmalloc+0xa6/0xd0 mm/kasan/common.c:524\n alloc_dr drivers/base/devres.c:116 [inline]\n devm_kmalloc+0x96/0x1d0 drivers/base/devres.c:823\n devm_kzalloc include/linux/device.h:209 [inline]\n port100_probe+0x8a/0x1320 drivers/nfc/port100.c:1502\n\nFreed by task 1255:\n kasan_save_stack+0x1e/0x40 mm/kasan/common.c:38\n kasan_set_track+0x21/0x30 mm/kasan/common.c:45\n kasan_set_free_info+0x20/0x30 mm/kasan/generic.c:370\n ____kasan_slab_free mm/kasan/common.c:366 [inline]\n ____kasan_slab_free+0xff/0x140 mm/kasan/common.c:328\n kasan_slab_free include/linux/kasan.h:236 [inline]\n __cache_free mm/slab.c:3437 [inline]\n kfree+0xf8/0x2b0 mm/slab.c:3794\n release_nodes+0x112/0x1a0 drivers/base/devres.c:501\n devres_release_all+0x114/0x190 drivers/base/devres.c:530\n really_probe+0x626/0xcc0 drivers/base/dd.c:670" } ], "providerMetadata": { "dateUpdated": "2024-11-04T12:17:56.374Z", "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "shortName": "Linux" }, "references": [ { "url": "https://git.kernel.org/stable/c/205c4ec78e71cbf561794e6043da80e7bae6790f" }, { "url": "https://git.kernel.org/stable/c/32e866ae5a7af590597ef4bcff8451bf96d5f980" }, { "url": "https://git.kernel.org/stable/c/b1db33d4e54bc35d8db96ce143ea0ef92e23d58e" }, { "url": "https://git.kernel.org/stable/c/cd2a5c0da0d1ddf11d1f84e9c9b1949f50f6e161" }, { "url": "https://git.kernel.org/stable/c/2b1c85f56512d49e43bc53741fce2f508cd90029" }, { "url": "https://git.kernel.org/stable/c/0e721b8f2ee5e11376dd55363f9ccb539d754b8a" }, { "url": "https://git.kernel.org/stable/c/7194737e1be8fdc89d2a9382bd2f371f7ee2eda8" }, { "url": "https://git.kernel.org/stable/c/f80cfe2f26581f188429c12bd937eb905ad3ac7b" } ], "title": "NFC: port100: fix use-after-free in port100_send_complete", "x_generator": { "engine": "bippy-9e1c9544281a" } } }, "cveMetadata": { "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "assignerShortName": "Linux", "cveId": "CVE-2022-48857", "datePublished": "2024-07-16T12:25:22.464Z", "dateReserved": "2024-07-16T11:38:08.919Z", "dateUpdated": "2024-11-04T12:17:56.374Z", "state": "PUBLISHED" }, "dataType": "CVE_RECORD", "dataVersion": "5.1", "meta": { "nvd": "{\"cve\":{\"id\":\"CVE-2022-48857\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2024-07-16T13:15:12.733\",\"lastModified\":\"2024-11-21T07:34:13.493\",\"vulnStatus\":\"Modified\",\"cveTags\":[],\"descriptions\":[{\"lang\":\"en\",\"value\":\"In the Linux kernel, the following vulnerability has been resolved:\\n\\nNFC: port100: fix use-after-free in port100_send_complete\\n\\nSyzbot reported UAF in port100_send_complete(). The root case is in\\nmissing usb_kill_urb() calls on error handling path of -\u003eprobe function.\\n\\nport100_send_complete() accesses devm allocated memory which will be\\nfreed on probe failure. We should kill this urbs before returning an\\nerror from probe function to prevent reported use-after-free\\n\\nFail log:\\n\\nBUG: KASAN: use-after-free in port100_send_complete+0x16e/0x1a0 drivers/nfc/port100.c:935\\nRead of size 1 at addr ffff88801bb59540 by task ksoftirqd/2/26\\n...\\nCall Trace:\\n \u003cTASK\u003e\\n __dump_stack lib/dump_stack.c:88 [inline]\\n dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106\\n print_address_description.constprop.0.cold+0x8d/0x303 mm/kasan/report.c:255\\n __kasan_report mm/kasan/report.c:442 [inline]\\n kasan_report.cold+0x83/0xdf mm/kasan/report.c:459\\n port100_send_complete+0x16e/0x1a0 drivers/nfc/port100.c:935\\n __usb_hcd_giveback_urb+0x2b0/0x5c0 drivers/usb/core/hcd.c:1670\\n\\n...\\n\\nAllocated by task 1255:\\n kasan_save_stack+0x1e/0x40 mm/kasan/common.c:38\\n kasan_set_track mm/kasan/common.c:45 [inline]\\n set_alloc_info mm/kasan/common.c:436 [inline]\\n ____kasan_kmalloc mm/kasan/common.c:515 [inline]\\n ____kasan_kmalloc mm/kasan/common.c:474 [inline]\\n __kasan_kmalloc+0xa6/0xd0 mm/kasan/common.c:524\\n alloc_dr drivers/base/devres.c:116 [inline]\\n devm_kmalloc+0x96/0x1d0 drivers/base/devres.c:823\\n devm_kzalloc include/linux/device.h:209 [inline]\\n port100_probe+0x8a/0x1320 drivers/nfc/port100.c:1502\\n\\nFreed by task 1255:\\n kasan_save_stack+0x1e/0x40 mm/kasan/common.c:38\\n kasan_set_track+0x21/0x30 mm/kasan/common.c:45\\n kasan_set_free_info+0x20/0x30 mm/kasan/generic.c:370\\n ____kasan_slab_free mm/kasan/common.c:366 [inline]\\n ____kasan_slab_free+0xff/0x140 mm/kasan/common.c:328\\n kasan_slab_free include/linux/kasan.h:236 [inline]\\n __cache_free mm/slab.c:3437 [inline]\\n kfree+0xf8/0x2b0 mm/slab.c:3794\\n release_nodes+0x112/0x1a0 drivers/base/devres.c:501\\n devres_release_all+0x114/0x190 drivers/base/devres.c:530\\n really_probe+0x626/0xcc0 drivers/base/dd.c:670\"},{\"lang\":\"es\",\"value\":\"En el kernel de Linux, se resolvi\u00f3 la siguiente vulnerabilidad: NFC: puerto100: corrige use-after-free en port100_send_complete Syzbot inform\u00f3 UAF en port100_send_complete(). El caso ra\u00edz es que faltan llamadas usb_kill_urb() en la ruta de manejo de errores de -\u0026gt;funci\u00f3n de sonda. port100_send_complete() accede a la memoria asignada por el desarrollador que se liberar\u00e1 en caso de falla de la sonda. Deber\u00edamos eliminar estas urbs antes de devolver un error de la funci\u00f3n de sonda para evitar el registro de errores de use-after-free: ERROR: KASAN: use-after-free en port100_send_complete+0x16e/0x1a0 drivers/nfc/port100.c:935 Lectura de tama\u00f1o 1 en addr ffff88801bb59540 por tarea ksoftirqd/2/26... Seguimiento de llamadas: __dump_stack lib/dump_stack.c:88 [en l\u00ednea] dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106 print_address_description.constprop.0.cold +0x8d/0x303 mm/kasan/report.c:255 __kasan_report mm/kasan/report.c:442 [en l\u00ednea] kasan_report.cold+0x83/0xdf mm/kasan/report.c:459 port100_send_complete+0x16e/0x1a0 controladores/nfc /port100.c:935 __usb_hcd_giveback_urb+0x2b0/0x5c0 drivers/usb/core/hcd.c:1670 ... Asignado por tarea 1255: kasan_save_stack+0x1e/0x40 mm/kasan/common.c:38 kasan_set_track mm/kasan/common .c:45 [en l\u00ednea] set_alloc_info mm/kasan/common.c:436 [en l\u00ednea] ____kasan_kmalloc mm/kasan/common.c:515 [en l\u00ednea] ____kasan_kmalloc mm/kasan/common.c:474 [en l\u00ednea] __kasan_kmalloc+0xa6/ 0xd0 mm/kasan/common.c:524 alloc_dr drivers/base/devres.c:116 [en l\u00ednea] devm_kmalloc+0x96/0x1d0 drivers/base/devres.c:823 devm_kzalloc include/linux/device.h:209 [en l\u00ednea] port100_probe+0x8a/0x1320 drivers/nfc/port100.c:1502 Liberado por la tarea 1255: kasan_save_stack+0x1e/0x40 mm/kasan/common.c:38 kasan_set_track+0x21/0x30 mm/kasan/common.c:45 kasan_set_free_info+0x20 /0x30 mm/kasan/generic.c:370 ____kasan_slab_free mm/kasan/common.c:366 [en l\u00ednea] ____kasan_slab_free+0xff/0x140 mm/kasan/common.c:328 kasan_slab_free include/linux/kasan.h:236 [en l\u00ednea ] __cache_free mm/slab.c:3437 [en l\u00ednea] kfree+0xf8/0x2b0 mm/slab.c:3794 release_nodes+0x112/0x1a0 drivers/base/devres.c:501 devres_release_all+0x114/0x190 drivers/base/devres.c :530 realmente_probe+0x626/0xcc0 controladores/base/dd.c:670\"}],\"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-416\"}]}],\"configurations\":[{\"nodes\":[{\"operator\":\"OR\",\"negate\":false,\"cpeMatch\":[{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\",\"versionStartIncluding\":\"3.13\",\"versionEndExcluding\":\"4.9.307\",\"matchCriteriaId\":\"418A5C9A-0A91-423F-839C-BF3DAF6C0403\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\",\"versionStartIncluding\":\"4.10\",\"versionEndExcluding\":\"4.14.272\",\"matchCriteriaId\":\"7F0FA2C5-4E50-48A6-9D72-7C133B60EF05\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\",\"versionStartIncluding\":\"4.15\",\"versionEndExcluding\":\"4.19.235\",\"matchCriteriaId\":\"F8671D74-E8CD-4E41-A93F-3E3E88125D16\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\",\"versionStartIncluding\":\"4.20\",\"versionEndExcluding\":\"5.4.185\",\"matchCriteriaId\":\"B374BFBF-C879-4A72-921F-C850CF7DFB99\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\",\"versionStartIncluding\":\"5.5\",\"versionEndExcluding\":\"5.10.106\",\"matchCriteriaId\":\"6A4F38AC-99A2-48DF-B132-C9F785B309B8\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\",\"versionStartIncluding\":\"5.11\",\"versionEndExcluding\":\"5.15.29\",\"matchCriteriaId\":\"15DC6588-B28F-4637-9A1E-3753B34A40CF\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\",\"versionStartIncluding\":\"5.16\",\"versionEndExcluding\":\"5.16.15\",\"matchCriteriaId\":\"83FDEDF2-0E19-4879-91FD-171E66D1B335\"}]}]}],\"references\":[{\"url\":\"https://git.kernel.org/stable/c/0e721b8f2ee5e11376dd55363f9ccb539d754b8a\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/205c4ec78e71cbf561794e6043da80e7bae6790f\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/2b1c85f56512d49e43bc53741fce2f508cd90029\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/32e866ae5a7af590597ef4bcff8451bf96d5f980\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/7194737e1be8fdc89d2a9382bd2f371f7ee2eda8\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/b1db33d4e54bc35d8db96ce143ea0ef92e23d58e\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/cd2a5c0da0d1ddf11d1f84e9c9b1949f50f6e161\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/f80cfe2f26581f188429c12bd937eb905ad3ac7b\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/0e721b8f2ee5e11376dd55363f9ccb539d754b8a\",\"source\":\"af854a3a-2127-422b-91ae-364da2661108\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/205c4ec78e71cbf561794e6043da80e7bae6790f\",\"source\":\"af854a3a-2127-422b-91ae-364da2661108\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/2b1c85f56512d49e43bc53741fce2f508cd90029\",\"source\":\"af854a3a-2127-422b-91ae-364da2661108\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/32e866ae5a7af590597ef4bcff8451bf96d5f980\",\"source\":\"af854a3a-2127-422b-91ae-364da2661108\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/7194737e1be8fdc89d2a9382bd2f371f7ee2eda8\",\"source\":\"af854a3a-2127-422b-91ae-364da2661108\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/b1db33d4e54bc35d8db96ce143ea0ef92e23d58e\",\"source\":\"af854a3a-2127-422b-91ae-364da2661108\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/cd2a5c0da0d1ddf11d1f84e9c9b1949f50f6e161\",\"source\":\"af854a3a-2127-422b-91ae-364da2661108\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/f80cfe2f26581f188429c12bd937eb905ad3ac7b\",\"source\":\"af854a3a-2127-422b-91ae-364da2661108\",\"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.