{"id":"CVE-2024-57923","aliases":["CVE-2024-57923"],"related":[],"kind":"vulnerability","state":"published","title":"btrfs: zlib: fix avail_in bytes for s390 zlib HW compression path","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nbtrfs: zlib: fix avail_in bytes for s390 zlib HW compression path\n\nSince the input data length passed to zlib_compress_folios() can be\narbitrary, always setting strm.avail_in to a multiple of PAGE_SIZE may\ncause read-in bytes to exceed the input range. Currently this triggers\nan assert in btrfs_compress_folios() on the debug kernel (see below).\nFix strm.avail_in calculation for S390 hardware acceleration path.\n\n  assertion failed: *total_in <= orig_len, in fs/btrfs/compression.c:1041\n  ------------[ cut here ]------------\n  kernel BUG at fs/btrfs/compression.c:1041!\n  monitor event: 0040 ilc:2 [#1] PREEMPT SMP\n  CPU: 16 UID: 0 PID: 325 Comm: kworker/u273:3 Not tainted 6.13.0-20241204.rc1.git6.fae3b21430ca.300.fc41.s390x+debug #1\n  Hardware name: IBM 3931 A01 703 (z/VM 7.4.0)\n  Workqueue: btrfs-delalloc btrfs_work_helper\n  Krnl PSW : 0704d00180000000 0000021761df6538 (btrfs_compress_folios+0x198/0x1a0)\n             R:0 T:1 IO:1 EX:1 Key:0 M:1 W:0 P:0 AS:3 CC:1 PM:0 RI:0 EA:3\n  Krnl GPRS: 0000000080000000 0000000000000001 0000000000000047 0000000000000000\n             0000000000000006 ffffff01757bb000 000001976232fcc0 000000000000130c\n             000001976232fcd0 000001976232fcc8 00000118ff4a0e30 0000000000000001\n             00000111821ab400 0000011100000000 0000021761df6534 000001976232fb58\n  Krnl Code: 0000021761df6528: c020006f5ef4        larl    %r2,0000021762be2310\n             0000021761df652e: c0e5ffbd09d5        brasl   %r14,00000217615978d8\n            #0000021761df6534: af000000            mc      0,0\n            >0000021761df6538: 0707                bcr     0,%r7\n             0000021761df653a: 0707                bcr     0,%r7\n             0000021761df653c: 0707                bcr     0,%r7\n             0000021761df653e: 0707                bcr     0,%r7\n             0000021761df6540: c004004bb7ec        brcl    0,000002176276d518\n  Call Trace:\n   [<0000021761df6538>] btrfs_compress_folios+0x198/0x1a0\n  ([<0000021761df6534>] btrfs_compress_folios+0x194/0x1a0)\n   [<0000021761d97788>] compress_file_range+0x3b8/0x6d0\n   [<0000021761dcee7c>] btrfs_work_helper+0x10c/0x160\n   [<0000021761645760>] process_one_work+0x2b0/0x5d0\n   [<000002176164637e>] worker_thread+0x20e/0x3e0\n   [<000002176165221a>] kthread+0x15a/0x170\n   [<00000217615b859c>] __ret_from_fork+0x3c/0x60\n   [<00000217626e72d2>] ret_from_fork+0xa/0x38\n  INFO: lockdep is turned off.\n  Last Breaking-Event-Address:\n   [<0000021761597924>] _printk+0x4c/0x58\n  Kernel panic - not syncing: Fatal exception: panic_on_oops","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nbtrfs: zlib: fix avail_in bytes for s390 zlib HW compression path\n\nSince the input data length passed to zlib_compress_folios() can be\narbitrary, always setting strm.avail_in to a multiple of PAGE_SIZE may\ncause read-in bytes to exceed the input range. Currently this triggers\nan assert in btrfs_compress_folios() on the debug kernel (see below).\nFix strm.avail_in calculation for S390 hardware acceleration path.\n\n  assertion failed: *total_in <= orig_len, in fs/btrfs/compression.c:1041\n  ------------[ cut here ]------------\n  kernel BUG at fs/btrfs/compression.c:1041!\n  monitor event: 0040 ilc:2 [#1] PREEMPT SMP\n  CPU: 16 UID: 0 PID: 325 Comm: kworker/u273:3 Not tainted 6.13.0-20241204.rc1.git6.fae3b21430ca.300.fc41.s390x+debug #1\n  Hardware name: IBM 3931 A01 703 (z/VM 7.4.0)\n  Workqueue: btrfs-delalloc btrfs_work_helper\n  Krnl PSW : 0704d00180000000 0000021761df6538 (btrfs_compress_folios+0x198/0x1a0)\n             R:0 T:1 IO:1 EX:1 Key:0 M:1 W:0 P:0 AS:3 CC:1 PM:0 RI:0 EA:3\n  Krnl GPRS: 0000000080000000 0000000000000001 0000000000000047 0000000000000000\n             0000000000000006 ffffff01757bb000 000001976232fcc0 000000000000130c\n             000001976232fcd0 000001976232fcc8 00000118ff4a0e30 0000000000000001\n             00000111821ab400 0000011100000000 0000021761df6534 000001976232fb58\n  Krnl Code: 0000021761df6528: c020006f5ef4        larl    %r2,0000021762be2310\n             0000021761df652e: c0e5ffbd09d5        brasl   %r14,00000217615978d8\n            #0000021761df6534: af000000            mc      0,0\n            >0000021761df6538: 0707                bcr     0,%r7\n             0000021761df653a: 0707                bcr     0,%r7\n             0000021761df653c: 0707                bcr     0,%r7\n             0000021761df653e: 0707                bcr     0,%r7\n             0000021761df6540: c004004bb7ec        brcl    0,000002176276d518\n  Call Trace:\n   [<0000021761df6538>] btrfs_compress_folios+0x198/0x1a0\n  ([<0000021761df6534>] btrfs_compress_folios+0x194/0x1a0)\n   [<0000021761d97788>] compress_file_range+0x3b8/0x6d0\n   [<0000021761dcee7c>] btrfs_work_helper+0x10c/0x160\n   [<0000021761645760>] process_one_work+0x2b0/0x5d0\n   [<000002176164637e>] worker_thread+0x20e/0x3e0\n   [<000002176165221a>] kthread+0x15a/0x170\n   [<00000217615b859c>] __ret_from_fork+0x3c/0x60\n   [<00000217626e72d2>] ret_from_fork+0xa/0x38\n  INFO: lockdep is turned off.\n  Last Breaking-Event-Address:\n   [<0000021761597924>] _printk+0x4c/0x58\n  Kernel panic - not syncing: Fatal exception: panic_on_oops","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: btrfs: zlib: arregla los bytes avail_in para la ruta de compresión de hardware zlib s390 Dado que la longitud de los datos de entrada que se pasan a zlib_compress_folios() puede ser arbitraria, configurar siempre strm.avail_in como un múltiplo de PAGE_SIZE puede provocar que los bytes de lectura superen el rango de entrada. Actualmente, esto activa una afirmación en btrfs_compress_folios() en el kernel de depuración (ver a continuación). Arregla el cálculo de strm.avail_in para la ruta de aceleración de hardware S390. La afirmación falló: *total_in &lt;= orig_len, en fs/btrfs/compression.c:1041 ------------[ corte aquí ]------------ ¡ERROR del kernel en fs/btrfs/compression.c:1041! Evento de monitor: 0040 ilc:2 [#1] PREEMPT SMP CPU: 16 UID: 0 PID: 325 Comm: kworker/u273:3 No contaminado 6.13.0-20241204.rc1.git6.fae3b21430ca.300.fc41.s390x+debug #1 Nombre de hardware: IBM 3931 A01 703 (z/VM 7.4.0) Cola de trabajo: btrfs-delalloc btrfs_work_helper Krnl PSW: 0704d00180000000 0000021761df6538 (btrfs_compress_folios+0x198/0x1a0) R:0 T:1 IO:1 EX:1 Clave:0 M:1 W:0 P:0 AS:3 CC:1 PM:0 RI:0 EA:3 Krnl GPRS: 0000000080000000 0000000000000001 0000000000000047 0000000000000000 000000000000006 ffffff01757bb000 000001976232fcc0 000000000000130c 000001976232fcd0 000001976232fcc8 00000118ff4a0e30 0000000000000001 00000111821ab400 0000011100000000 0000021761df6534 000001976232fb58 Código Krnl: 0000021761df6528: c020006f5ef4 larl %r2,0000021762be2310 0000021761df652e: c0e5ffbd09d5 brasl %r14,00000217615978d8 #0000021761df6534: af000000 mc 0,0 &gt;0000021761df6538: 0707 bcr 0,%r7 0000021761df653a: 0707 bcr 0,%r7 0000021761df653c: 0707 bcr 0,%r7 0000021761df653e: 0707 bcr 0,%r7 0000021761df6540: c004004bb7ec brcl 0,000002176276d518 Seguimiento de llamadas: [&lt;0000021761df6538&gt;] btrfs_compress_folios+0x198/0x1a0 ([&lt;0000021761df6534&gt;] btrfs_compress_folios+0x194/0x1a0) [&lt;0000021761d97788&gt;] rango_archivo_comprimir+0x3b8/0x6d0 [&lt;0000021761dcee7c&gt;] ayuda_trabajo_btrfs+0x10c/0x160 [&lt;0000021761645760&gt;] trabajo_proceso_uno+0x2b0/0x5d0 [&lt;000002176164637e&gt;] subproceso_trabajador+0x20e/0x3e0 [&lt;000002176165221a&gt;] subproceso_k+0x15a/0x170 [&lt;00000217615b859c&gt;] __ret_de_bifurcación+0x3c/0x60 [&lt;00000217626e72d2&gt;] ret_de_bifurcación+0xa/0x38 INFORMACIÓN: bloqueo_dep es Desactivado. Dirección del último evento de ruptura: [&lt;0000021761597924&gt;] _printk+0x4c/0x58 Pánico del kernel: no se sincroniza: Excepción fatal: panic_on_oops","source":"nvd"}],"published":"2025-01-19T11:52:41.798Z","modified":"2026-06-17T08:14:14.547Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"},"severities":[{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"}],"cwes":["CWE-617"],"affected":[{"ranges":[{"type":"git","introduced":"fd1e75d0105d2289e24b6d63cee49e6f7952c8bf","fixed":"25adbb08aeadcff883ab801df99fd20fefbb6ca4","status":"affected"},{"type":"git","introduced":"fd1e75d0105d2289e24b6d63cee49e6f7952c8bf","fixed":"0ee4736c003daded513de0ff112d4a1e9c85bbab","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"6.12","status":"affected"},{"type":"semver","introduced":"0","fixed":"6.12","status":"unaffected"},{"type":"semver","introduced":"6.12.10","lastAffected":"6.12.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"6.13","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","introduced":"6.12","fixed":"6.12.10"},{"status":"affected","version":"6.13"},{"status":"affected","version":"6.13"},{"status":"affected","version":"6.13"},{"status":"affected","version":"6.13"},{"status":"affected","version":"6.13"},{"status":"affected","version":"6.13"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/25adbb08aeadcff883ab801df99fd20fefbb6ca4","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/0ee4736c003daded513de0ff112d4a1e9c85bbab","tags":["patch"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2024-57923","url":"https://www.cve.org/CVERecord?id=CVE-2024-57923","licence":"CVE Terms of Use","modified":"2026-05-11T21:00:39.423Z"},{"source":"nvd","name":"NVD","id":"CVE-2024-57923","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-57923","licence":"Public domain","modified":"2026-06-17T08:14:14.547Z"}],"updatedAt":"2026-11-25T22:58:51.134Z","epss":{"score":0.00215,"percentile":0.12657,"date":"2026-12-01T12:00:22.000Z"}}