ubi: ubi_wl_put_peb: Fix infinite loop when wear-leveling work failed
In the Linux kernel, the following vulnerability has been resolved: ubi: ubi_wl_put_peb: Fix infinite loop when wear-leveling work failed Following process will trigger an infinite loop in ubi_wl_put_peb(): ubifs_bgt ubi_bgt ubifs_leb_unmap ubi_leb_unmap ubi_eba_unmap_leb ubi_wl_put_peb wear_leveling_worker e1 = rb_entry(rb_first(&ubi->used) e2 = get_peb_for_wl(ubi) ubi_io_read_vid_hdr // return err (flash fault) out_error: ubi->move_from = ubi->move_to = NULL wl_entry_destroy(ubi, e1) ubi->lookuptbl[e->pnum] = NULL retry: e = ubi->lookuptbl[pnum]; // return NULL if (e == ubi->move_from) { // NULL == NULL gets true goto retry; // infinite loop !!! $ top PID USER PR NI VIRT RES SHR S %CPU %MEM COMMAND 7676 root 20 0 0 0 0 R 100.0 0.0 ubifs_bgt0_0 Fix it by: 1) Letting ubi_wl_put_peb() returns directly if wearl leveling entry has been removed from 'ubi->lookuptbl'. 2) Using 'ubi->wl_lock' protecting wl entry deletion to preventing an use-after-free problem for wl entry in ubi_wl_put_peb(). Fetch a reproducer in [Link].
- Products
- Kernel
- Affected versions
- Not specified
- Fixed versions
- 4.14.308, 4.19.276, 5.10.173, 5.15.100, 5.4.235, 6.1.18, 6.2.5
- CVEs
- CVE-2023-53481
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 4 Nov 2026, 11:52 UTC · Revision 1
Source evidence
ubi: ubi_wl_put_peb: Fix infinite loop when wear-leveling work failed
core-osv · Original sourcePublished 1 Oct 2025, 11:42 UTC
In the Linux kernel, the following vulnerability has been resolved: ubi: ubi_wl_put_peb: Fix infinite loop when wear-leveling work failed Following process will trigger an infinite loop in ubi_wl_put_peb(): ubifs_bgt ubi_bgt ubifs_leb_unmap ubi_leb_unmap ubi_eba_unmap_leb ubi_wl_put_peb wear_leveling_worker e1 = rb_entry(rb_first(&ubi->used) e2 = get_peb_for_wl(ubi) ubi_io_read_vid_hdr // return err (flash fault) out_error: ubi->move_from = ubi->move_to = NULL wl_entry_destroy(ubi, e1) ubi->lookuptbl[e->pnum] = NULL retry: e = ubi->lookuptbl[pnum]; // return NULL if (e == ubi->move_from) { // NULL == NULL gets true goto retry; // infinite loop !!! $ top PID USER PR NI VIRT RES SHR S %CPU %MEM COMMAND 7676 root 20 0 0 0 0 R 100.0 0.0 ubifs_bgt0_0 Fix it by: 1) Letting ubi_wl_put_peb() returns directly if wearl leveling entry has been removed from 'ubi->lookuptbl'. 2) Using 'ubi->wl_lock' protecting wl entry deletion to preventing an use-after-free problem for wl entry in ubi_wl_put_peb(). Fetch a reproducer in [Link].
osv:CVE-2023-53481
Kernel
Fixed versions: 4.14.308, 4.19.276, 5.4.235, 5.10.173, 5.15.100, 6.1.18, 6.2.5
Complete source record
{
"id": "4aaca58ed39e016d043ceba3b73d22ba052bfae0616277d7ede4f7bde04cc684",
"url": "https://osv.dev/vulnerability/CVE-2023-53481",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "ubi: ubi_wl_put_peb: Fix infinite loop when wear-leveling work failed",
"summary": "In the Linux kernel, the following vulnerability has been resolved: ubi: ubi_wl_put_peb: Fix infinite loop when wear-leveling work failed Following process will trigger an infinite loop in ubi_wl_put_peb(): ubifs_bgt ubi_bgt ubifs_leb_unmap ubi_leb_unmap ubi_eba_unmap_leb ubi_wl_put_peb wear_leveling_worker e1 = rb_entry(rb_first(&ubi->used) e2 = get_peb_for_wl(ubi) ubi_io_read_vid_hdr // return err (flash fault) out_error: ubi->move_from = ubi->move_to = NULL wl_entry_destroy(ubi, e1) ubi->lookuptbl[e->pnum] = NULL retry: e = ubi->lookuptbl[pnum]; // return NULL if (e == ubi->move_from) { // NULL == NULL gets true goto retry; // infinite loop !!! $ top PID USER PR NI VIRT RES SHR S %CPU %MEM COMMAND 7676 root 20 0 0 0 0 R 100.0 0.0 ubifs_bgt0_0 Fix it by: 1) Letting ubi_wl_put_peb() returns directly if wearl leveling entry has been removed from 'ubi->lookuptbl'. 2) Using 'ubi->wl_lock' protecting wl entry deletion to preventing an use-after-free problem for wl entry in ubi_wl_put_peb(). Fetch a reproducer in [Link].",
"evidence": "osv:CVE-2023-53481",
"products": [
{
"name": {
"value": "Kernel",
"evidence": "/affected/1/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "4.14.308",
"evidence": "/affected/1/ranges"
},
{
"value": "4.19.276",
"evidence": "/affected/1/ranges"
},
{
"value": "5.4.235",
"evidence": "/affected/1/ranges"
},
{
"value": "5.10.173",
"evidence": "/affected/1/ranges"
},
{
"value": "5.15.100",
"evidence": "/affected/1/ranges"
},
{
"value": "6.1.18",
"evidence": "/affected/1/ranges"
},
{
"value": "6.2.5",
"evidence": "/affected/1/ranges"
}
],
"affected_versions": []
}
],
"severity": "high",
"structured": {
"id": "CVE-2023-53481",
"aliases": [
"CVE-2023-53481"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "GIT",
"events": [
{
"introduced": "43f9b25a9cdd7b177f77f026b1461abd1abbd174"
},
{
"fixed": "b40d2fbf47af58377e898b5062077a47bb28a132"
},
{
"fixed": "f006f596fe851c3b6aae60b79f89f89f0e515d2f"
},
{
"fixed": "b5be23f6ae610bdb262160a1f294afee6d0e6a69"
},
{
"fixed": "8a18856e074479bd050b01e688c58defadce7ab0"
},
{
"fixed": "3afaaf6f5867dc4ad383808d4053f428ec7b867d"
},
{
"fixed": "cc4bc532acda66189bddc03b3fe1ad689d9a48a2"
},
{
"fixed": "5af1c643184a5d09ff5b3f334077a4d0a163c677"
},
{
"fixed": "4d57a7333e26040f2b583983e1970d9d460e56b0"
}
]
}
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2023-53481.json"
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "2.6.25"
},
{
"fixed": "4.14.308"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "4.15.0"
},
{
"fixed": "4.19.276"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "4.20.0"
},
{
"fixed": "5.4.235"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "5.5.0"
},
{
"fixed": "5.10.173"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "5.11.0"
},
{
"fixed": "5.15.100"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "5.16.0"
},
{
"fixed": "6.1.18"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.2.0"
},
{
"fixed": "6.2.5"
}
]
}
],
"package": {
"name": "Kernel",
"ecosystem": "Linux"
},
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2023-53481.json"
}
}
],
"modified": "2026-10-28T02:30:35.099478134Z",
"provider": "osv",
"references": [
"https://git.kernel.org/stable/c/3afaaf6f5867dc4ad383808d4053f428ec7b867d",
"https://git.kernel.org/stable/c/4d57a7333e26040f2b583983e1970d9d460e56b0",
"https://git.kernel.org/stable/c/5af1c643184a5d09ff5b3f334077a4d0a163c677",
"https://git.kernel.org/stable/c/8a18856e074479bd050b01e688c58defadce7ab0",
"https://git.kernel.org/stable/c/b40d2fbf47af58377e898b5062077a47bb28a132",
"https://git.kernel.org/stable/c/b5be23f6ae610bdb262160a1f294afee6d0e6a69",
"https://git.kernel.org/stable/c/cc4bc532acda66189bddc03b3fe1ad689d9a48a2",
"https://git.kernel.org/stable/c/f006f596fe851c3b6aae60b79f89f89f0e515d2f",
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/53xxx/CVE-2023-53481.json",
"https://nvd.nist.gov/vuln/detail/CVE-2023-53481",
"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
],
"provider_metadata": {
"cna_assigner": "Linux",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/53xxx/CVE-2023-53481.json"
}
},
"related_cves": [
{
"value": "CVE-2023-53481",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 502160,
"published_at": "2025-10-01T11:42:49.825+00:00"
}