{"id":"CVE-2021-47458","aliases":["CVE-2021-47458"],"related":[],"kind":"vulnerability","state":"published","title":"ocfs2: mount fails with buffer overflow in strlen","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nocfs2: mount fails with buffer overflow in strlen\n\nStarting with kernel 5.11 built with CONFIG_FORTIFY_SOURCE mouting an\nocfs2 filesystem with either o2cb or pcmk cluster stack fails with the\ntrace below.  Problem seems to be that strings for cluster stack and\ncluster name are not guaranteed to be null terminated in the disk\nrepresentation, while strlcpy assumes that the source string is always\nnull terminated.  This causes a read outside of the source string\ntriggering the buffer overflow detection.\n\n  detected buffer overflow in strlen\n  ------------[ cut here ]------------\n  kernel BUG at lib/string.c:1149!\n  invalid opcode: 0000 [#1] SMP PTI\n  CPU: 1 PID: 910 Comm: mount.ocfs2 Not tainted 5.14.0-1-amd64 #1\n    Debian 5.14.6-2\n  RIP: 0010:fortify_panic+0xf/0x11\n  ...\n  Call Trace:\n   ocfs2_initialize_super.isra.0.cold+0xc/0x18 [ocfs2]\n   ocfs2_fill_super+0x359/0x19b0 [ocfs2]\n   mount_bdev+0x185/0x1b0\n   legacy_get_tree+0x27/0x40\n   vfs_get_tree+0x25/0xb0\n   path_mount+0x454/0xa20\n   __x64_sys_mount+0x103/0x140\n   do_syscall_64+0x3b/0xc0\n   entry_SYSCALL_64_after_hwframe+0x44/0xae","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nocfs2: mount fails with buffer overflow in strlen\n\nStarting with kernel 5.11 built with CONFIG_FORTIFY_SOURCE mouting an\nocfs2 filesystem with either o2cb or pcmk cluster stack fails with the\ntrace below.  Problem seems to be that strings for cluster stack and\ncluster name are not guaranteed to be null terminated in the disk\nrepresentation, while strlcpy assumes that the source string is always\nnull terminated.  This causes a read outside of the source string\ntriggering the buffer overflow detection.\n\n  detected buffer overflow in strlen\n  ------------[ cut here ]------------\n  kernel BUG at lib/string.c:1149!\n  invalid opcode: 0000 [#1] SMP PTI\n  CPU: 1 PID: 910 Comm: mount.ocfs2 Not tainted 5.14.0-1-amd64 #1\n    Debian 5.14.6-2\n  RIP: 0010:fortify_panic+0xf/0x11\n  ...\n  Call Trace:\n   ocfs2_initialize_super.isra.0.cold+0xc/0x18 [ocfs2]\n   ocfs2_fill_super+0x359/0x19b0 [ocfs2]\n   mount_bdev+0x185/0x1b0\n   legacy_get_tree+0x27/0x40\n   vfs_get_tree+0x25/0xb0\n   path_mount+0x454/0xa20\n   __x64_sys_mount+0x103/0x140\n   do_syscall_64+0x3b/0xc0\n   entry_SYSCALL_64_after_hwframe+0x44/0xae","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, se resolvió la siguiente vulnerabilidad: ocfs2: el montaje falla con desbordamiento del búfer en strlen. A partir del kernel 5.11 compilado con CONFIG_FORTIFY_SOURCE, la conexión de un sistema de archivos ocfs2 con una pila de clúster o2cb o pcmk falla con el siguiente seguimiento. El problema parece ser que no se garantiza que las cadenas para la pila del clúster y el nombre del clúster tengan terminación nula en la representación del disco, mientras que strlcpy supone que la cadena de origen siempre termina en nulo. Esto provoca una lectura fuera de la cadena de origen que activa la detección de desbordamiento del búfer. se detectó desbordamiento del búfer en strlen ------------[ cortar aquí ]------------ ¡ERROR del kernel en lib/string.c:1149! código de operación no válido: 0000 [#1] SMP PTI CPU: 1 PID: 910 Comm: mount.ocfs2 No contaminado 5.14.0-1-amd64 #1 Debian 5.14.6-2 RIP: 0010:fortify_panic+0xf/0x11... Seguimiento de llamadas: ocfs2_initialize_super.isra.0.cold+0xc/0x18 [ocfs2] ocfs2_fill_super+0x359/0x19b0 [ocfs2] mount_bdev+0x185/0x1b0 Legacy_get_tree+0x27/0x40 vfs_get_tree+0x25/0xb0 xa20 __x64_sys_mount+0x103/0x140 do_syscall_64+0x3b/0xc0 entrada_SYSCALL_64_after_hwframe+0x44/0xae","source":"nvd"}],"published":"2024-05-22T06:19:46.675Z","modified":"2026-08-05T08:47:55.163Z","severity":{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:H","score":7.1,"rating":"HIGH"},"severities":[{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:H","score":7.1,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"}],"cwes":["CWE-787"],"affected":[{"ranges":[{"type":"git","introduced":"c74a3bdd9b529d924d1abf986079b783dd105ace","fixed":"ac011cb3ff7a76b3e0e6e77158ee4ba2f929e1fb","status":"affected"},{"type":"git","introduced":"c74a3bdd9b529d924d1abf986079b783dd105ace","fixed":"4b74ddcc22ee6455946e80a9c4808801f8f8561e","status":"affected"},{"type":"git","introduced":"c74a3bdd9b529d924d1abf986079b783dd105ace","fixed":"232ed9752510de4436468b653d145565669c8498","status":"affected"},{"type":"git","introduced":"c74a3bdd9b529d924d1abf986079b783dd105ace","fixed":"7623b1035ca2d17bde0f6a086ad6844a34648df1","status":"affected"},{"type":"git","introduced":"c74a3bdd9b529d924d1abf986079b783dd105ace","fixed":"d3a83576378b4c904f711598dde2c5e881c4295c","status":"affected"},{"type":"git","introduced":"c74a3bdd9b529d924d1abf986079b783dd105ace","fixed":"93be0eeea14cf39235e585c8f56df3b3859deaad","status":"affected"},{"type":"git","introduced":"c74a3bdd9b529d924d1abf986079b783dd105ace","fixed":"0e677ea5b7396f715a76b6b0ef441430e4c4b57f","status":"affected"},{"type":"git","introduced":"c74a3bdd9b529d924d1abf986079b783dd105ace","fixed":"b15fa9224e6e1239414525d8d556d824701849fc","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"3.14","status":"affected"},{"type":"semver","introduced":"0","fixed":"3.14","status":"unaffected"},{"type":"semver","introduced":"4.4.290","lastAffected":"4.4.*","status":"unaffected"},{"type":"semver","introduced":"4.9.288","lastAffected":"4.9.*","status":"unaffected"},{"type":"semver","introduced":"4.14.253","lastAffected":"4.14.*","status":"unaffected"},{"type":"semver","introduced":"4.19.214","lastAffected":"4.19.*","status":"unaffected"},{"type":"semver","introduced":"5.4.156","lastAffected":"5.4.*","status":"unaffected"},{"type":"semver","introduced":"5.10.76","lastAffected":"5.10.*","status":"unaffected"},{"type":"semver","introduced":"5.14.15","lastAffected":"5.14.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"5.15","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"status":"affected","fixed":"4.4.290"},{"status":"affected","introduced":"4.5","fixed":"4.9.288"},{"status":"affected","introduced":"4.10","fixed":"4.14.253"},{"status":"affected","introduced":"4.15","fixed":"4.19.214"},{"status":"affected","introduced":"4.20","fixed":"5.4.156"},{"status":"affected","introduced":"5.5","fixed":"5.10.76"},{"status":"affected","introduced":"5.11","fixed":"5.14.15"},{"status":"affected","version":"5.15"},{"status":"affected","version":"5.15"},{"status":"affected","version":"5.15"},{"status":"affected","version":"5.15"},{"status":"affected","version":"5.15"},{"status":"affected","version":"5.15"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/ac011cb3ff7a76b3e0e6e77158ee4ba2f929e1fb","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/4b74ddcc22ee6455946e80a9c4808801f8f8561e","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/232ed9752510de4436468b653d145565669c8498","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/7623b1035ca2d17bde0f6a086ad6844a34648df1","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/d3a83576378b4c904f711598dde2c5e881c4295c","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/93be0eeea14cf39235e585c8f56df3b3859deaad","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/0e677ea5b7396f715a76b6b0ef441430e4c4b57f","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/b15fa9224e6e1239414525d8d556d824701849fc","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2024-06-10T18:55:25.437Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2021-47458","url":"https://www.cve.org/CVERecord?id=CVE-2021-47458","licence":"CVE Terms of Use","modified":"2026-08-05T08:47:55.163Z"},{"source":"nvd","name":"NVD","id":"CVE-2021-47458","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-47458","licence":"Public domain","modified":"2026-08-04T10:17:04.247Z"}],"updatedAt":"2026-11-25T22:58:08.868Z","epss":{"score":0.00249,"percentile":0.17318,"date":"2026-12-01T12:00:22.000Z"}}