Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2764A34845E for ; Wed, 24 Dec 2025 13:10:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766581853; cv=none; b=lVd6NksYFs2qZWRlilfXNoQtvaWv4Z6z9ebdDn6b3gceekukZ1UumUz5KZQLuX9X5pmir9jyu2QLmcFCRnxhZpwj08GkfgybgyDjHMEtmr1RAOc42HRs3H4sbyVnKV5DESrmEkKXdqedoPFqUVwWkzuejklnH1RaAm7umG4FgEc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766581853; c=relaxed/simple; bh=+KUQimveSPicRPXtrtv5L+B0BpRRqQAXZZ5gDC8qgxs=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=HOoZlNBsuXTAF0FJ45Tu72Gm/bOCORoh5ogv86V7crOq9OgoN8StYcv1Pdd0qPNEh3iNYafTZeHmwRqNse/xlEkCuEkUgsopE4QmcFY3tngfISh/hSHvLoAyH4c0J2bk5jJXYp7OZ4+kS1WgiiUGXFYGP8Yu3ltxUfm7QZWwOVc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=HWTOquBo; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="HWTOquBo" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A1C61C4CEFB; Wed, 24 Dec 2025 13:10:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1766581853; bh=+KUQimveSPicRPXtrtv5L+B0BpRRqQAXZZ5gDC8qgxs=; h=From:To:Cc:Subject:Date:Reply-To:From; b=HWTOquBo2qpuORtkmnkF7tHO08MTtfYCoANeUTrDSSFMPEwZ+B+JyppY4o4Anyjnd WY0+stUpXH8CwR8qHZkdbOlmWJt08ofmqNhPTao6xsyvUQQARb7tFskR9EHGuWSxXg QjVzrk8hD14WQaqWOHk7XAZWIZLSWum+r4AmyYPM= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2023-54127: fs/jfs: prevent double-free in dbUnmount() after failed jfs_remount() Date: Wed, 24 Dec 2025 14:07:24 +0100 Message-ID: <2025122418-CVE-2023-54127-87e6@gregkh> X-Mailer: git-send-email 2.52.0 Reply-To: , Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=6225; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=R43M7bz3oYdIRICuOaeJGTqc9NKx/om3g/6Q0JggYyg=; b=owGbwMvMwCRo6H6F97bub03G02pJDJneT73mdk/StCtcOeW/SKaPbPa1LCWtVfPNHeqSJMuFD 4Stfu/fEcvCIMjEICumyPJlG8/R/RWHFL0MbU/DzGFlAhnCwMUpABP5Lc6wYH98nFriEvNC7bBX O0JEhUK2LplwnmHB+QPn/Wf8+3jgqgy3RLLlxP2/3Y98BgA= X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit From: Greg Kroah-Hartman Description =========== In the Linux kernel, the following vulnerability has been resolved: fs/jfs: prevent double-free in dbUnmount() after failed jfs_remount() Syzkaller reported the following issue: ================================================================== BUG: KASAN: double-free in slab_free mm/slub.c:3787 [inline] BUG: KASAN: double-free in __kmem_cache_free+0x71/0x110 mm/slub.c:3800 Free of addr ffff888086408000 by task syz-executor.4/12750 [...] Call Trace: [...] kasan_report_invalid_free+0xac/0xd0 mm/kasan/report.c:482 ____kasan_slab_free+0xfb/0x120 kasan_slab_free include/linux/kasan.h:177 [inline] slab_free_hook mm/slub.c:1781 [inline] slab_free_freelist_hook+0x12e/0x1a0 mm/slub.c:1807 slab_free mm/slub.c:3787 [inline] __kmem_cache_free+0x71/0x110 mm/slub.c:3800 dbUnmount+0xf4/0x110 fs/jfs/jfs_dmap.c:264 jfs_umount+0x248/0x3b0 fs/jfs/jfs_umount.c:87 jfs_put_super+0x86/0x190 fs/jfs/super.c:194 generic_shutdown_super+0x130/0x310 fs/super.c:492 kill_block_super+0x79/0xd0 fs/super.c:1386 deactivate_locked_super+0xa7/0xf0 fs/super.c:332 cleanup_mnt+0x494/0x520 fs/namespace.c:1291 task_work_run+0x243/0x300 kernel/task_work.c:179 resume_user_mode_work include/linux/resume_user_mode.h:49 [inline] exit_to_user_mode_loop+0x124/0x150 kernel/entry/common.c:171 exit_to_user_mode_prepare+0xb2/0x140 kernel/entry/common.c:203 __syscall_exit_to_user_mode_work kernel/entry/common.c:285 [inline] syscall_exit_to_user_mode+0x26/0x60 kernel/entry/common.c:296 do_syscall_64+0x49/0xb0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x63/0xcd [...] Allocated by task 13352: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x3d/0x60 mm/kasan/common.c:52 ____kasan_kmalloc mm/kasan/common.c:371 [inline] __kasan_kmalloc+0x97/0xb0 mm/kasan/common.c:380 kmalloc include/linux/slab.h:580 [inline] dbMount+0x54/0x980 fs/jfs/jfs_dmap.c:164 jfs_mount+0x1dd/0x830 fs/jfs/jfs_mount.c:121 jfs_fill_super+0x590/0xc50 fs/jfs/super.c:556 mount_bdev+0x26c/0x3a0 fs/super.c:1359 legacy_get_tree+0xea/0x180 fs/fs_context.c:610 vfs_get_tree+0x88/0x270 fs/super.c:1489 do_new_mount+0x289/0xad0 fs/namespace.c:3145 do_mount fs/namespace.c:3488 [inline] __do_sys_mount fs/namespace.c:3697 [inline] __se_sys_mount+0x2d3/0x3c0 fs/namespace.c:3674 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Freed by task 13352: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x3d/0x60 mm/kasan/common.c:52 kasan_save_free_info+0x27/0x40 mm/kasan/generic.c:518 ____kasan_slab_free+0xd6/0x120 mm/kasan/common.c:236 kasan_slab_free include/linux/kasan.h:177 [inline] slab_free_hook mm/slub.c:1781 [inline] slab_free_freelist_hook+0x12e/0x1a0 mm/slub.c:1807 slab_free mm/slub.c:3787 [inline] __kmem_cache_free+0x71/0x110 mm/slub.c:3800 dbUnmount+0xf4/0x110 fs/jfs/jfs_dmap.c:264 jfs_mount_rw+0x545/0x740 fs/jfs/jfs_mount.c:247 jfs_remount+0x3db/0x710 fs/jfs/super.c:454 reconfigure_super+0x3bc/0x7b0 fs/super.c:935 vfs_fsconfig_locked fs/fsopen.c:254 [inline] __do_sys_fsconfig fs/fsopen.c:439 [inline] __se_sys_fsconfig+0xad5/0x1060 fs/fsopen.c:314 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd [...] JFS_SBI(ipbmap->i_sb)->bmap wasn't set to NULL after kfree() in dbUnmount(). Syzkaller uses faultinject to reproduce this KASAN double-free warning. The issue is triggered if either diMount() or dbMount() fail in jfs_remount(), since diUnmount() or dbUnmount() already happened in such a case - they will do double-free on next execution: jfs_umount or jfs_remount. Tested on both upstream and jfs-next by syzkaller. The Linux kernel CVE team has assigned CVE-2023-54127 to this issue. Affected and fixed versions =========================== Fixed in 4.14.326 with commit 798c5f6f98bc9045593d4b3a65c32f05d97bd0e6 Fixed in 4.19.295 with commit aef6507e85475e30831c30405d785c7ed976ea4a Fixed in 5.4.257 with commit b12ccbfdf6539ef0157868f69fcae0b7f7a072b3 Fixed in 5.10.197 with commit 6f8b34458948ffca2fe90cd8c614e3fa2ebe0b27 Fixed in 5.15.133 with commit aa5b019a3e0f7f54f4e5370c1af827f6b00fd26b Fixed in 6.1.55 with commit 2f7a36448f51d08d3a83f1514abcca4b680bcd3c Fixed in 6.5.5 with commit f71c4bb3ec08dfcbd201350a6a0a914c4e6a9e3f Fixed in 6.6 with commit cade5397e5461295f3cb87880534b6a07cafa427 Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community. Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at https://cve.org/CVERecord/?id=CVE-2023-54127 will be updated if fixes are backported, please check that for the most up to date information about this issue. Affected files ============== The file(s) affected by this issue are: fs/jfs/jfs_dmap.c Mitigation ========== The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits: https://git.kernel.org/stable/c/798c5f6f98bc9045593d4b3a65c32f05d97bd0e6 https://git.kernel.org/stable/c/aef6507e85475e30831c30405d785c7ed976ea4a https://git.kernel.org/stable/c/b12ccbfdf6539ef0157868f69fcae0b7f7a072b3 https://git.kernel.org/stable/c/6f8b34458948ffca2fe90cd8c614e3fa2ebe0b27 https://git.kernel.org/stable/c/aa5b019a3e0f7f54f4e5370c1af827f6b00fd26b https://git.kernel.org/stable/c/2f7a36448f51d08d3a83f1514abcca4b680bcd3c https://git.kernel.org/stable/c/f71c4bb3ec08dfcbd201350a6a0a914c4e6a9e3f https://git.kernel.org/stable/c/cade5397e5461295f3cb87880534b6a07cafa427