{
  "threat_severity" : "Moderate",
  "public_date" : "2024-05-21T00:00:00Z",
  "bugzilla" : {
    "description" : "kernel: f2fs: split initial and dynamic conditions for extent_cache",
    "id" : "2282700",
    "url" : "https://bugzilla.redhat.com/show_bug.cgi?id=2282700"
  },
  "cvss3" : {
    "cvss3_base_score" : "5.5",
    "cvss3_scoring_vector" : "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H",
    "status" : "draft"
  },
  "cwe" : "CWE-476",
  "details" : [ "In the Linux kernel, the following vulnerability has been resolved:\nf2fs: split initial and dynamic conditions for extent_cache\nLet's allocate the extent_cache tree without dynamic conditions to avoid a\nmissing condition causing a panic as below.\n# create a file w/ a compressed flag\n# disable the compression\n# panic while updating extent_cache\nF2FS-fs (dm-64): Swapfile: last extent is not aligned to section\nF2FS-fs (dm-64): Swapfile (3) is not align to section: 1) creat(), 2) ioctl(F2FS_IOC_SET_PIN_FILE), 3) fallocate(2097152 * N)\nAdding 124996k swap on ./swap-file.  Priority:0 extents:2 across:17179494468k\n==================================================================\nBUG: KASAN: null-ptr-deref in instrument_atomic_read_write out/common/include/linux/instrumented.h:101 [inline]\nBUG: KASAN: null-ptr-deref in atomic_try_cmpxchg_acquire out/common/include/asm-generic/atomic-instrumented.h:705 [inline]\nBUG: KASAN: null-ptr-deref in queued_write_lock out/common/include/asm-generic/qrwlock.h:92 [inline]\nBUG: KASAN: null-ptr-deref in __raw_write_lock out/common/include/linux/rwlock_api_smp.h:211 [inline]\nBUG: KASAN: null-ptr-deref in _raw_write_lock+0x5a/0x110 out/common/kernel/locking/spinlock.c:295\nWrite of size 4 at addr 0000000000000030 by task syz-executor154/3327\nCPU: 0 PID: 3327 Comm: syz-executor154 Tainted: G           O      5.10.185 #1\nHardware name: emulation qemu-x86/qemu-x86, BIOS 2023.01-21885-gb3cc1cd24d 01/01/2023\nCall Trace:\n__dump_stack out/common/lib/dump_stack.c:77 [inline]\ndump_stack_lvl+0x17e/0x1c4 out/common/lib/dump_stack.c:118\n__kasan_report+0x16c/0x260 out/common/mm/kasan/report.c:415\nkasan_report+0x51/0x70 out/common/mm/kasan/report.c:428\nkasan_check_range+0x2f3/0x340 out/common/mm/kasan/generic.c:186\n__kasan_check_write+0x14/0x20 out/common/mm/kasan/shadow.c:37\ninstrument_atomic_read_write out/common/include/linux/instrumented.h:101 [inline]\natomic_try_cmpxchg_acquire out/common/include/asm-generic/atomic-instrumented.h:705 [inline]\nqueued_write_lock out/common/include/asm-generic/qrwlock.h:92 [inline]\n__raw_write_lock out/common/include/linux/rwlock_api_smp.h:211 [inline]\n_raw_write_lock+0x5a/0x110 out/common/kernel/locking/spinlock.c:295\n__drop_extent_tree+0xdf/0x2f0 out/common/fs/f2fs/extent_cache.c:1155\nf2fs_drop_extent_tree+0x17/0x30 out/common/fs/f2fs/extent_cache.c:1172\nf2fs_insert_range out/common/fs/f2fs/file.c:1600 [inline]\nf2fs_fallocate+0x19fd/0x1f40 out/common/fs/f2fs/file.c:1764\nvfs_fallocate+0x514/0x9b0 out/common/fs/open.c:310\nksys_fallocate out/common/fs/open.c:333 [inline]\n__do_sys_fallocate out/common/fs/open.c:341 [inline]\n__se_sys_fallocate out/common/fs/open.c:339 [inline]\n__x64_sys_fallocate+0xb8/0x100 out/common/fs/open.c:339\ndo_syscall_64+0x35/0x50 out/common/arch/x86/entry/common.c:46" ],
  "package_state" : [ {
    "product_name" : "Red Hat Enterprise Linux 6",
    "fix_state" : "Not affected",
    "package_name" : "kernel",
    "cpe" : "cpe:/o:redhat:enterprise_linux:6"
  }, {
    "product_name" : "Red Hat Enterprise Linux 7",
    "fix_state" : "Not affected",
    "package_name" : "kernel",
    "cpe" : "cpe:/o:redhat:enterprise_linux:7"
  }, {
    "product_name" : "Red Hat Enterprise Linux 7",
    "fix_state" : "Not affected",
    "package_name" : "kernel-rt",
    "cpe" : "cpe:/o:redhat:enterprise_linux:7"
  }, {
    "product_name" : "Red Hat Enterprise Linux 8",
    "fix_state" : "Not affected",
    "package_name" : "kernel",
    "cpe" : "cpe:/o:redhat:enterprise_linux:8"
  }, {
    "product_name" : "Red Hat Enterprise Linux 8",
    "fix_state" : "Not affected",
    "package_name" : "kernel-rt",
    "cpe" : "cpe:/o:redhat:enterprise_linux:8"
  }, {
    "product_name" : "Red Hat Enterprise Linux 9",
    "fix_state" : "Not affected",
    "package_name" : "kernel",
    "cpe" : "cpe:/o:redhat:enterprise_linux:9"
  }, {
    "product_name" : "Red Hat Enterprise Linux 9",
    "fix_state" : "Not affected",
    "package_name" : "kernel-rt",
    "cpe" : "cpe:/o:redhat:enterprise_linux:9"
  } ],
  "references" : [ "https://www.cve.org/CVERecord?id=CVE-2023-52770\nhttps://nvd.nist.gov/vuln/detail/CVE-2023-52770\nhttps://lore.kernel.org/linux-cve-announce/2024052150-CVE-2023-52770-fa95@gregkh/T" ],
  "name" : "CVE-2023-52770",
  "csaw" : false
}