From e37406aa5401c1638c610e91a90f7d4349cd2762 Mon Sep 17 00:00:00 2001 From: Denis Efremov Date: Thu, 15 Feb 2024 16:05:44 +0400 Subject: [PATCH] Add CVE-2023-4389 Signed-off-by: Denis Efremov --- cvehound/cve/CVE-2023-4389.cocci | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 cvehound/cve/CVE-2023-4389.cocci diff --git a/cvehound/cve/CVE-2023-4389.cocci b/cvehound/cve/CVE-2023-4389.cocci new file mode 100644 index 0000000..888aa07 --- /dev/null +++ b/cvehound/cve/CVE-2023-4389.cocci @@ -0,0 +1,27 @@ +/// Files: fs/btrfs/disk-io.c +/// Fix: 168a2f776b9762f4021421008512dd7ab7474df1 +/// Fixes: bc44d7c4b2b179c4b74fba208b9908e2ecbc1b4d + +virtual detect + +@err@ +identifier fs_info, root, ret; +position p; +@@ + +\(btrfs_get_root_ref\|btrfs_get_fs_root\)(struct btrfs_fs_info *fs_info, ...) +{ + ... +* ret = btrfs_insert_fs_root(fs_info, root); + if (ret) { +* \(btrfs_put_root@p\|btrfs_put_fs_root@p\)(root); + ... + } + ... +} + +@script:python depends on detect@ +p << err.p; +@@ + +coccilib.report.print_report(p[0], 'ERROR: CVE-2023-4389')