From 12c3b91ecd6707767e752d90304e860826cbe19a Mon Sep 17 00:00:00 2001 From: Clovershrub Date: Sat, 21 Dec 2024 23:12:54 +0800 Subject: [PATCH] =?UTF-8?q?SSTS=E6=96=B0=E5=A2=9E=E8=A7=84=E5=88=99?= =?UTF-8?q?=EF=BC=9ACVE-2024-26602=20&=20CVE-2023-52467?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Clovershrub --- .../07/CVE-2023-52467/CVE-2023-52467.yara | 34 +++++ .../TestCaseRule-CVE-2023-52467.json | 130 ++++++++++++++++++ .../07/CVE-2024-26602/CVE-2024-26602.yara | 33 +++++ .../TestCaseRule-CVE-2024-26602.json | 130 ++++++++++++++++++ 4 files changed, 327 insertions(+) create mode 100644 vulntest/SSTSTestcases/2024/07/CVE-2023-52467/CVE-2023-52467.yara create mode 100644 vulntest/SSTSTestcases/2024/07/CVE-2023-52467/TestCaseRule-CVE-2023-52467.json create mode 100644 vulntest/SSTSTestcases/2024/07/CVE-2024-26602/CVE-2024-26602.yara create mode 100644 vulntest/SSTSTestcases/2024/07/CVE-2024-26602/TestCaseRule-CVE-2024-26602.json diff --git a/vulntest/SSTSTestcases/2024/07/CVE-2023-52467/CVE-2023-52467.yara b/vulntest/SSTSTestcases/2024/07/CVE-2023-52467/CVE-2023-52467.yara new file mode 100644 index 0000000..4f2ec71 --- /dev/null +++ b/vulntest/SSTSTestcases/2024/07/CVE-2023-52467/CVE-2023-52467.yara @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2024 Beijing University of Posts and Telecommunications. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import "console" + +rule CVE-2023-52467 +{ + meta: + date="2024-12-21" + openharmony_sa="" + cve="CVE-2023-52467" + affected_files="/dev/block/platform/fe310000.sdhci/by-name/boot_linux" + + strings: + + $fix = {E0 23 00 F9 ?? ?? 00 B4 E8 0B 40 B9} + $vul = {97 E8 0B 40 B9 E0 23 00 F9 E9 03 40 B9} + + condition: + ((not $vul) and $fix) and console.log("CVE-2023-52467 testcase pass") +} \ No newline at end of file diff --git a/vulntest/SSTSTestcases/2024/07/CVE-2023-52467/TestCaseRule-CVE-2023-52467.json b/vulntest/SSTSTestcases/2024/07/CVE-2023-52467/TestCaseRule-CVE-2023-52467.json new file mode 100644 index 0000000..00d90a0 --- /dev/null +++ b/vulntest/SSTSTestcases/2024/07/CVE-2023-52467/TestCaseRule-CVE-2023-52467.json @@ -0,0 +1,130 @@ +{ + "month": "2024-07", + "release_time": "", + "vulnerabilities": [ + { + "month": "2024-07", + + "vul_id": { + "cve": "CVE-2023-52467", + "openharmony-sa": "" + }, + + "severity": "medium", + + "vul_description": { + "zh": "空指针解引用。", + "en": "Null pointer dereference." + }, + + "vul_impact": { + "zh": "攻击者可利用该漏洞导致内核崩溃。", + "en": "An attacker can exploit this vulnerability to cause the kernel to crash." + }, + + "disclosure": { + "zh": "https://gitee.com/openharmony/security/blob/master/zh/security-disclosure/2024/2024-07.md", + "en": "https://gitee.com/openharmony/security/blob/master/en/security-disclosure/2024/2024-07.md" + }, + + "patch_info": { + "4.0.x": { + "patch_url": [ + "https://gitee.com/openharmony/kernel_linux_5.10/commit/31ae9fa0970430aec74542d48d00f781d8c75b1b" + ], + "patch_file": [ + "https://gitee.com/openharmony/kernel_linux_5.10/commit/31ae9fa0970430aec74542d48d00f781d8c75b1b.patch" + ], + "diff_file": [ + "https://gitee.com/openharmony/kernel_linux_5.10/commit/31ae9fa0970430aec74542d48d00f781d8c75b1b.diff" + ] + } + }, + + "affected_projects": "kernel_linux_5.10", + + "object_type": "kernel_linux", + + "affected_versions": [ + "4.0.0-4.1.1" + ], + + "affected_device": { + "mini": { + "liteos": { + "rics-v": { + "scan_strategy": { + "ssts": { + "enable": false + }, + "ists": { + "enable": false + } + } + } + } + }, + + "small": { + "liteos": { + "rics-v": { + "scan_strategy": { + "ssts": { + "enable": false + }, + "ists": { + "enable": false + } + } + } + }, + "linux": { + "arm": { + "scan_strategy": { + "ssts": { + "enable": false + }, + "ists": { + "enable": false + } + } + } + } + }, + + "standard": { + "linux": { + "arm": { + "scan_strategy": { + "ssts": { + "enable": false + }, + "ists": { + "enable": true, + "yara": { + "affected_files": [ + "/dev/block/platform/fe310000.sdhci/by-name/boot_linux" + ], + "yara_rules": [ + "CVE-2023-52467.yara" + ] + } + } + } + }, + "arm64": { + "scan_strategy": { + "ssts": { + "enable": false + }, + "ists": { + "enable": false + } + } + } + } + } + } + } + ] +} \ No newline at end of file diff --git a/vulntest/SSTSTestcases/2024/07/CVE-2024-26602/CVE-2024-26602.yara b/vulntest/SSTSTestcases/2024/07/CVE-2024-26602/CVE-2024-26602.yara new file mode 100644 index 0000000..4e3c57b --- /dev/null +++ b/vulntest/SSTSTestcases/2024/07/CVE-2024-26602/CVE-2024-26602.yara @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2024 Beijing University of Posts and Telecommunications. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import "console" + +rule CVE-2024-26602 +{ + meta: + date="2024-12-21" + openharmony_sa="" + cve="CVE-2024-26602" + affected_files="/dev/block/platform/fe310000.sdhci/by-name/boot_linux" + + strings: + + $fix = {BF 3B 03 D5 ?? ?? ?? ?? ?? ?? ?? 91 ?? ?? ?? 94 E0 03 1F 2A} + + condition: + $fix and console.log("CVE-2024-26602 testcase pass") +} \ No newline at end of file diff --git a/vulntest/SSTSTestcases/2024/07/CVE-2024-26602/TestCaseRule-CVE-2024-26602.json b/vulntest/SSTSTestcases/2024/07/CVE-2024-26602/TestCaseRule-CVE-2024-26602.json new file mode 100644 index 0000000..77a13aa --- /dev/null +++ b/vulntest/SSTSTestcases/2024/07/CVE-2024-26602/TestCaseRule-CVE-2024-26602.json @@ -0,0 +1,130 @@ +{ + "month": "2024-07", + "release_time": "", + "vulnerabilities": [ + { + "month": "2024-07", + + "vul_id": { + "cve": "CVE-2024-26602", + "openharmony-sa": "" + }, + + "severity": "medium", + + "vul_description": { + "zh": "在某些系统上,sys_mambarrier可能非常昂贵,导致所有东西的整体速度减慢。", + "en": "On some systems, sys_membarrier can be very expensive, causing overall slowdowns for everything." + }, + + "vul_impact": { + "zh": "在某些系统上,sys_mambarrier可能非常昂贵,导致所有东西的整体速度减慢。", + "en": "On some systems, sys_membarrier can be very expensive, causing overall slowdowns for everything." + }, + + "disclosure": { + "zh": "https://gitee.com/openharmony/security/blob/master/zh/security-disclosure/2024/2024-07.md", + "en": "https://gitee.com/openharmony/security/blob/master/en/security-disclosure/2024/2024-07.md" + }, + + "patch_info": { + "4.0.x": { + "patch_url": [ + "https://gitee.com/openharmony/kernel_linux_5.10/commit/788cc050e4876941f423eb215330f28dc0dee04f" + ], + "patch_file": [ + "https://gitee.com/openharmony/kernel_linux_5.10/commit/788cc050e4876941f423eb215330f28dc0dee04f.patch" + ], + "diff_file": [ + "https://gitee.com/openharmony/kernel_linux_5.10/commit/788cc050e4876941f423eb215330f28dc0dee04f.diff" + ] + } + }, + + "affected_projects": "kernel_linux_5.10", + + "object_type": "kernel_linux", + + "affected_versions": [ + "4.0.0-4.1.1" + ], + + "affected_device": { + "mini": { + "liteos": { + "rics-v": { + "scan_strategy": { + "ssts": { + "enable": false + }, + "ists": { + "enable": false + } + } + } + } + }, + + "small": { + "liteos": { + "rics-v": { + "scan_strategy": { + "ssts": { + "enable": false + }, + "ists": { + "enable": false + } + } + } + }, + "linux": { + "arm": { + "scan_strategy": { + "ssts": { + "enable": false + }, + "ists": { + "enable": false + } + } + } + } + }, + + "standard": { + "linux": { + "arm": { + "scan_strategy": { + "ssts": { + "enable": false + }, + "ists": { + "enable": true, + "yara": { + "affected_files": [ + "/dev/block/platform/fe310000.sdhci/by-name/boot_linux" + ], + "yara_rules": [ + "CVE-2024-26602.yara" + ] + } + } + } + }, + "arm64": { + "scan_strategy": { + "ssts": { + "enable": false + }, + "ists": { + "enable": false + } + } + } + } + } + } + } + ] +} \ No newline at end of file -- Gitee