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.
[
{
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"133469180737657247044379797786187972970",
"18521063175249921146867630919016023139",
"275309216030907193226417908652704022519",
"307817079822497283208613887352748188961"
]
},
"target": {
"file": "drivers/tty/serial/8250/8250_omap.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@ad90d0358bd3b4554f243a425168fc7cebe7d04e",
"id": "CVE-2023-52457-019d1331",
"deprecated": false,
"signature_version": "v1"
},
{
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"133469180737657247044379797786187972970",
"198582764357458937859862720712867365280",
"333438618957099538162388276197093084591",
"152662076468757577415011709561326846322"
]
},
"target": {
"file": "drivers/tty/serial/8250/8250_omap.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@828cd829483f0cda920710997aed79130b0af690",
"id": "CVE-2023-52457-0feae0a9",
"deprecated": false,
"signature_version": "v1"
},
{
"signature_type": "Function",
"digest": {
"function_hash": "60242374312900973586700381775438012959",
"length": 413.0
},
"target": {
"file": "drivers/tty/serial/8250/8250_omap.c",
"function": "omap8250_remove"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@bc57f3ef8a9eb0180606696f586a6dcfaa175ed0",
"id": "CVE-2023-52457-2087174c",
"deprecated": false,
"signature_version": "v1"
},
{
"signature_type": "Function",
"digest": {
"function_hash": "237136215034958482052080110995373987870",
"length": 388.0
},
"target": {
"file": "drivers/tty/serial/8250/8250_omap.c",
"function": "omap8250_remove"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b502fb43f7fb55aaf07f6092ab44657595214b93",
"id": "CVE-2023-52457-280b2609",
"deprecated": false,
"signature_version": "v1"
},
{
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"133469180737657247044379797786187972970",
"18521063175249921146867630919016023139",
"275309216030907193226417908652704022519",
"307817079822497283208613887352748188961"
]
},
"target": {
"file": "drivers/tty/serial/8250/8250_omap.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@887a558d0298d36297daea039954c39940228d9b",
"id": "CVE-2023-52457-410990dc",
"deprecated": false,
"signature_version": "v1"
},
{
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"133469180737657247044379797786187972970",
"84439945322362967852431736414008097656",
"83299430708821635285915414115349553978",
"101767589093608540332600735881039819411"
]
},
"target": {
"file": "drivers/tty/serial/8250/8250_omap.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b502fb43f7fb55aaf07f6092ab44657595214b93",
"id": "CVE-2023-52457-449588c0",
"deprecated": false,
"signature_version": "v1"
},
{
"signature_type": "Function",
"digest": {
"function_hash": "60242374312900973586700381775438012959",
"length": 413.0
},
"target": {
"file": "drivers/tty/serial/8250/8250_omap.c",
"function": "omap8250_remove"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@d74173bda29aba58f822175d983d07c8ed335494",
"id": "CVE-2023-52457-483ef519",
"deprecated": false,
"signature_version": "v1"
},
{
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"133469180737657247044379797786187972970",
"18521063175249921146867630919016023139",
"275309216030907193226417908652704022519",
"307817079822497283208613887352748188961"
]
},
"target": {
"file": "drivers/tty/serial/8250/8250_omap.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@95e4e0031effad9837af557ecbfd4294a4d8aeee",
"id": "CVE-2023-52457-70486916",
"deprecated": false,
"signature_version": "v1"
},
{
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"133469180737657247044379797786187972970",
"198582764357458937859862720712867365280",
"333438618957099538162388276197093084591",
"152662076468757577415011709561326846322"
]
},
"target": {
"file": "drivers/tty/serial/8250/8250_omap.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@d74173bda29aba58f822175d983d07c8ed335494",
"id": "CVE-2023-52457-74e93201",
"deprecated": false,
"signature_version": "v1"
},
{
"signature_type": "Function",
"digest": {
"function_hash": "8198538527368498704840874835106486300",
"length": 489.0
},
"target": {
"file": "drivers/tty/serial/8250/8250_omap.c",
"function": "omap8250_remove"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@95e4e0031effad9837af557ecbfd4294a4d8aeee",
"id": "CVE-2023-52457-89799a87",
"deprecated": false,
"signature_version": "v1"
},
{
"signature_type": "Function",
"digest": {
"function_hash": "8198538527368498704840874835106486300",
"length": 489.0
},
"target": {
"file": "drivers/tty/serial/8250/8250_omap.c",
"function": "omap8250_remove"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@887a558d0298d36297daea039954c39940228d9b",
"id": "CVE-2023-52457-b23ac37a",
"deprecated": false,
"signature_version": "v1"
},
{
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"133469180737657247044379797786187972970",
"198582764357458937859862720712867365280",
"333438618957099538162388276197093084591",
"152662076468757577415011709561326846322"
]
},
"target": {
"file": "drivers/tty/serial/8250/8250_omap.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@bc57f3ef8a9eb0180606696f586a6dcfaa175ed0",
"id": "CVE-2023-52457-c44826d8",
"deprecated": false,
"signature_version": "v1"
},
{
"signature_type": "Function",
"digest": {
"function_hash": "60242374312900973586700381775438012959",
"length": 413.0
},
"target": {
"file": "drivers/tty/serial/8250/8250_omap.c",
"function": "omap8250_remove"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@828cd829483f0cda920710997aed79130b0af690",
"id": "CVE-2023-52457-d0dc3179",
"deprecated": false,
"signature_version": "v1"
},
{
"signature_type": "Function",
"digest": {
"function_hash": "8198538527368498704840874835106486300",
"length": 489.0
},
"target": {
"file": "drivers/tty/serial/8250/8250_omap.c",
"function": "omap8250_remove"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@ad90d0358bd3b4554f243a425168fc7cebe7d04e",
"id": "CVE-2023-52457-f558e9c6",
"deprecated": false,
"signature_version": "v1"
}
]