{"schema":"/api/v1/schema/cve.json","api_version":"1","id":"CVE-2021-47636","published":"2025-02-26T06:37:05.377000Z","last_modified":"2026-06-17T04:18:12.480000Z","status":"Modified","cvss":{"version":"3.1","score":7.1,"severity":"HIGH","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H","source":"nvd@nist.gov","primary":true},"auth":true,"cwes":["CWE-125"],"cpes":[{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","part":"o","vendor":"linux","product":"linux_kernel","version_start_including":"2.6.27","version_end_excluding":"4.19.238"},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","part":"o","vendor":"linux","product":"linux_kernel","version_start_including":"4.20","version_end_excluding":"5.4.189"},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","part":"o","vendor":"linux","product":"linux_kernel","version_start_including":"5.5","version_end_excluding":"5.10.110"},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","part":"o","vendor":"linux","product":"linux_kernel","version_start_including":"5.11","version_end_excluding":"5.15.33"},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","part":"o","vendor":"linux","product":"linux_kernel","version_start_including":"5.16","version_end_excluding":"5.16.19"},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","part":"o","vendor":"linux","product":"linux_kernel","version_start_including":"5.17","version_end_excluding":"5.17.2"}],"cpes_truncated":false,"vendors":["linux"],"products":["linux/linux_kernel"],"ssvc":{"exploitation":"none","automatable":"no","technical_impact":"partial"},"epss":{"score":0.00292,"percentile":0.14336,"date":"2026-11-29","model_version":"v2026.06.15"},"cat":"os","platform":"linux","eol":false,"packages":[],"severity":"high","priority_score":43,"links":{"html_es":"/es/cve/CVE-2021-47636/","html_en":"/en/cve/CVE-2021-47636/","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2021-47636","cve_org":"https://www.cve.org/CVERecord?id=CVE-2021-47636"},"untrusted":{"vendor_name":"Linux","product_name":"Linux Kernel","desc_en":"In the Linux kernel, the following vulnerability has been resolved:\n\nubifs: Fix read out-of-bounds in ubifs_wbuf_write_nolock()\n\nFunction ubifs_wbuf_write_nolock() may access buf out of bounds in\nfollowing process:\n\nubifs_wbuf_write_nolock():\n  aligned_len = ALIGN(len, 8);   // Assume len = 4089, aligned_len = 4096\n  if (aligned_len <= wbuf->avail) ... // Not satisfy\n  if (wbuf->used) {\n    ubifs_leb_write()  // Fill some data in avail wbuf\n    len -= wbuf->avail;   // len is still not 8-bytes aligned\n    aligned_len -= wbuf->avail;\n  }\n  n = aligned_len >> c->max_write_shift;\n  if (n) {\n    n <<= c->max_write_shift;\n    err = ubifs_leb_write(c, wbuf->lnum, buf + written,\n                          wbuf->offs, n);\n    // n > len, read out of bounds less than 8(n-len) bytes\n  }\n\n, which can be catched by KASAN:\n  =========================================================\n  BUG: KASAN: slab-out-of-bounds in ecc_sw_hamming_calculate+0x1dc/0x7d0\n  Read of size 4 at addr ffff888105594ff8 by task kworker/u8:4/128\n  Workqueue: writeback wb_workfn (flush-ubifs_0_0)\n  Call Trace:\n    kasan_report.cold+0x81/0x165\n    nand_write_page_swecc+0xa9/0x160\n    ubifs_leb_write+0xf2/0x1b0 [ubifs]\n    ubifs_wbuf_write_nolock+0x421/0x12c0 [ubifs]\n    write_head+0xdc/0x1c0 [ubifs]\n    ubifs_jnl_write_inode+0x627/0x960 [ubifs]\n    wb_workfn+0x8af/0xb80\n\nFunction ubifs_wbuf_write_nolock() accepts that parameter 'len' is not 8\nbytes aligned, the 'len' represents the true length of buf (which is\nallocated in 'ubifs_jnl_xxx', eg. ubifs_jnl_write_inode), so\nubifs_wbuf_write_nolock() must handle the length read from 'buf' carefully\nto write leb safely.\n\nFetch a reproducer in [Link].","affected":[{"untrusted_vendor":"Linux","untrusted_product":"Linux","versions":[]}],"references":[{"url":"https://git.kernel.org/stable/c/07a209fadee7b53b46858538e1177597273862e4","tags":["Patch"]},{"url":"https://git.kernel.org/stable/c/3b7fb89135a20587d57f8877c02e25003e9edbdf","tags":["Patch"]},{"url":"https://git.kernel.org/stable/c/4f2262a334641e05f645364d5ade1f565c85f20b","tags":["Patch"]},{"url":"https://git.kernel.org/stable/c/5343575aa11c5d7044107d59d43f84aec01312b0","tags":["Patch"]},{"url":"https://git.kernel.org/stable/c/a7054aaf1909cf40489c0ec1b728fdcf79c751a6","tags":["Patch"]},{"url":"https://git.kernel.org/stable/c/b80ccbec0e4804436c382d7dd60e943c386ed83a","tags":["Patch"]},{"url":"https://git.kernel.org/stable/c/e09fa5318d51f522e1af4fbaf8f74999355980c8","tags":["Patch"]}]}}