Skip to content
Heist/ feed
High

ubi: ubi_wl_put_peb: Fix infinite loop when wear-leveling work failed

Type: advisorySource: Official CVE List1 source record

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].

Announced Source revision 1
Original source ↗

CVE-2023-53481

Primary source · Revision 1

Imported from structured advisory data. Source references identify upstream records or fields; verify affected versions and your deployed configuration.

Security context

Source reference: cve:CVE-2023-53481

Linux

Source reference: /containers/cna/affected/0/product

Affected versions
Not stated in this record
Fixed versions
Not stated in this record
Prerequisites
Not stated in this record

Linux

Source reference: /containers/cna/affected/1/product

Affected versions
Not stated in this record
Fixed versions
Not stated in this record
Prerequisites
Not stated in this record

Structured affected-version data

Original package identities and version rules from this source.

[
  {
    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
    "vendor": "Linux",
    "product": "Linux",
    "versions": [
      {
        "status": "affected",
        "version": "43f9b25a9cdd7b177f77f026b1461abd1abbd174",
        "lessThan": "b40d2fbf47af58377e898b5062077a47bb28a132",
        "versionType": "git"
      },
      {
        "status": "affected",
        "version": "43f9b25a9cdd7b177f77f026b1461abd1abbd174",
        "lessThan": "f006f596fe851c3b6aae60b79f89f89f0e515d2f",
        "versionType": "git"
      },
      {
        "status": "affected",
        "version": "43f9b25a9cdd7b177f77f026b1461abd1abbd174",
        "lessThan": "b5be23f6ae610bdb262160a1f294afee6d0e6a69",
        "versionType": "git"
      },
      {
        "status": "affected",
        "version": "43f9b25a9cdd7b177f77f026b1461abd1abbd174",
        "lessThan": "8a18856e074479bd050b01e688c58defadce7ab0",
        "versionType": "git"
      },
      {
        "status": "affected",
        "version": "43f9b25a9cdd7b177f77f026b1461abd1abbd174",
        "lessThan": "3afaaf6f5867dc4ad383808d4053f428ec7b867d",
        "versionType": "git"
      },
      {
        "status": "affected",
        "version": "43f9b25a9cdd7b177f77f026b1461abd1abbd174",
        "lessThan": "cc4bc532acda66189bddc03b3fe1ad689d9a48a2",
        "versionType": "git"
      },
      {
        "status": "affected",
        "version": "43f9b25a9cdd7b177f77f026b1461abd1abbd174",
        "lessThan": "5af1c643184a5d09ff5b3f334077a4d0a163c677",
        "versionType": "git"
      },
      {
        "status": "affected",
        "version": "43f9b25a9cdd7b177f77f026b1461abd1abbd174",
        "lessThan": "4d57a7333e26040f2b583983e1970d9d460e56b0",
        "versionType": "git"
      }
    ],
    "programFiles": [
      "drivers/mtd/ubi/wl.c"
    ],
    "defaultStatus": "unaffected"
  },
  {
    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
    "vendor": "Linux",
    "product": "Linux",
    "versions": [
      {
        "status": "affected",
        "version": "2.6.25"
      },
      {
        "status": "unaffected",
        "version": "0",
        "lessThan": "2.6.25",
        "versionType": "semver"
      },
      {
        "status": "unaffected",
        "version": "4.14.308",
        "versionType": "semver",
        "lessThanOrEqual": "4.14.*"
      },
      {
        "status": "unaffected",
        "version": "4.19.276",
        "versionType": "semver",
        "lessThanOrEqual": "4.19.*"
      },
      {
        "status": "unaffected",
        "version": "5.4.235",
        "versionType": "semver",
        "lessThanOrEqual": "5.4.*"
      },
      {
        "status": "unaffected",
        "version": "5.10.173",
        "versionType": "semver",
        "lessThanOrEqual": "5.10.*"
      },
      {
        "status": "unaffected",
        "version": "5.15.100",
        "versionType": "semver",
        "lessThanOrEqual": "5.15.*"
      },
      {
        "status": "unaffected",
        "version": "6.1.18",
        "versionType": "semver",
        "lessThanOrEqual": "6.1.*"
      },
      {
        "status": "unaffected",
        "version": "6.2.5",
        "versionType": "semver",
        "lessThanOrEqual": "6.2.*"
      },
      {
        "status": "unaffected",
        "version": "6.3",
        "versionType": "original_commit_for_fix",
        "lessThanOrEqual": "*"
      }
    ],
    "programFiles": [
      "drivers/mtd/ubi/wl.c"
    ],
    "defaultStatus": "affected"
  }
]
Related CVEs
CVE-2023-53481

Source reference: /cveMetadata/cveId

Publisher severity

high

Source reference: /containers/cna/metrics

Event
#30270 · Revision 1
Added to Heist Feed
Publisher date
Read the original announcement