In the Linux kernel, the following vulnerability has been resolved:
serial: 8250: omap: Don't skip resource freeing if pmruntimeresumeandget() failed
Returning an error code from .remove() makes the driver core emit the little helpful error message:
remove callback returned a non-zero value. This will be ignored.
and then remove the device anyhow. So all resources that were not freed are leaked in this case. Skipping serial8250unregisterport() has the potential to keep enough of the UART around to trigger a use-after-free.
So replace the error return (and with it the little helpful error message) by a more useful error message and continue to cleanup.
{ "vanir_signatures": [ { "deprecated": false, "signature_type": "Line", "target": { "file": "drivers/tty/serial/8250/8250_omap.c" }, "signature_version": "v1", "digest": { "line_hashes": [ "133469180737657247044379797786187972970", "18521063175249921146867630919016023139", "275309216030907193226417908652704022519", "307817079822497283208613887352748188961" ], "threshold": 0.9 }, "id": "CVE-2023-52457-019d1331", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@ad90d0358bd3b4554f243a425168fc7cebe7d04e" }, { "deprecated": false, "signature_type": "Line", "target": { "file": "drivers/tty/serial/8250/8250_omap.c" }, "signature_version": "v1", "digest": { "line_hashes": [ "133469180737657247044379797786187972970", "198582764357458937859862720712867365280", "333438618957099538162388276197093084591", "152662076468757577415011709561326846322" ], "threshold": 0.9 }, "id": "CVE-2023-52457-0feae0a9", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@828cd829483f0cda920710997aed79130b0af690" }, { "deprecated": false, "signature_type": "Function", "target": { "file": "drivers/tty/serial/8250/8250_omap.c", "function": "omap8250_remove" }, "signature_version": "v1", "digest": { "length": 413.0, "function_hash": "60242374312900973586700381775438012959" }, "id": "CVE-2023-52457-2087174c", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@bc57f3ef8a9eb0180606696f586a6dcfaa175ed0" }, { "deprecated": false, "signature_type": "Function", "target": { "file": "drivers/tty/serial/8250/8250_omap.c", "function": "omap8250_remove" }, "signature_version": "v1", "digest": { "length": 388.0, "function_hash": "237136215034958482052080110995373987870" }, "id": "CVE-2023-52457-280b2609", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b502fb43f7fb55aaf07f6092ab44657595214b93" }, { "deprecated": false, "signature_type": "Line", "target": { "file": "drivers/tty/serial/8250/8250_omap.c" }, "signature_version": "v1", "digest": { "line_hashes": [ "133469180737657247044379797786187972970", "18521063175249921146867630919016023139", "275309216030907193226417908652704022519", "307817079822497283208613887352748188961" ], "threshold": 0.9 }, "id": "CVE-2023-52457-410990dc", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@887a558d0298d36297daea039954c39940228d9b" }, { "deprecated": false, "signature_type": "Line", "target": { "file": "drivers/tty/serial/8250/8250_omap.c" }, "signature_version": "v1", "digest": { "line_hashes": [ "133469180737657247044379797786187972970", "84439945322362967852431736414008097656", "83299430708821635285915414115349553978", "101767589093608540332600735881039819411" ], "threshold": 0.9 }, "id": "CVE-2023-52457-449588c0", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b502fb43f7fb55aaf07f6092ab44657595214b93" }, { "deprecated": false, "signature_type": "Function", "target": { "file": "drivers/tty/serial/8250/8250_omap.c", "function": "omap8250_remove" }, "signature_version": "v1", "digest": { "length": 413.0, "function_hash": "60242374312900973586700381775438012959" }, "id": "CVE-2023-52457-483ef519", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@d74173bda29aba58f822175d983d07c8ed335494" }, { "deprecated": false, "signature_type": "Line", "target": { "file": "drivers/tty/serial/8250/8250_omap.c" }, "signature_version": "v1", "digest": { "line_hashes": [ "133469180737657247044379797786187972970", "18521063175249921146867630919016023139", "275309216030907193226417908652704022519", "307817079822497283208613887352748188961" ], "threshold": 0.9 }, "id": "CVE-2023-52457-70486916", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@95e4e0031effad9837af557ecbfd4294a4d8aeee" }, { "deprecated": false, "signature_type": "Line", "target": { "file": "drivers/tty/serial/8250/8250_omap.c" }, "signature_version": "v1", "digest": { "line_hashes": [ "133469180737657247044379797786187972970", "198582764357458937859862720712867365280", "333438618957099538162388276197093084591", "152662076468757577415011709561326846322" ], "threshold": 0.9 }, "id": "CVE-2023-52457-74e93201", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@d74173bda29aba58f822175d983d07c8ed335494" }, { "deprecated": false, "signature_type": "Function", "target": { "file": "drivers/tty/serial/8250/8250_omap.c", "function": "omap8250_remove" }, "signature_version": "v1", "digest": { "length": 489.0, "function_hash": "8198538527368498704840874835106486300" }, "id": "CVE-2023-52457-89799a87", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@95e4e0031effad9837af557ecbfd4294a4d8aeee" }, { "deprecated": false, "signature_type": "Function", "target": { "file": "drivers/tty/serial/8250/8250_omap.c", "function": "omap8250_remove" }, "signature_version": "v1", "digest": { "length": 489.0, "function_hash": "8198538527368498704840874835106486300" }, "id": "CVE-2023-52457-b23ac37a", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@887a558d0298d36297daea039954c39940228d9b" }, { "deprecated": false, "signature_type": "Line", "target": { "file": "drivers/tty/serial/8250/8250_omap.c" }, "signature_version": "v1", "digest": { "line_hashes": [ "133469180737657247044379797786187972970", "198582764357458937859862720712867365280", "333438618957099538162388276197093084591", "152662076468757577415011709561326846322" ], "threshold": 0.9 }, "id": "CVE-2023-52457-c44826d8", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@bc57f3ef8a9eb0180606696f586a6dcfaa175ed0" }, { "deprecated": false, "signature_type": "Function", "target": { "file": "drivers/tty/serial/8250/8250_omap.c", "function": "omap8250_remove" }, "signature_version": "v1", "digest": { "length": 413.0, "function_hash": "60242374312900973586700381775438012959" }, "id": "CVE-2023-52457-d0dc3179", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@828cd829483f0cda920710997aed79130b0af690" }, { "deprecated": false, "signature_type": "Function", "target": { "file": "drivers/tty/serial/8250/8250_omap.c", "function": "omap8250_remove" }, "signature_version": "v1", "digest": { "length": 489.0, "function_hash": "8198538527368498704840874835106486300" }, "id": "CVE-2023-52457-f558e9c6", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@ad90d0358bd3b4554f243a425168fc7cebe7d04e" } ] }