From 920d255d022140b89c2ae13943e9068c5523e8ca Mon Sep 17 00:00:00 2001 From: LIMBO <1132948658@qq.com> Date: Fri, 10 Feb 2023 09:52:58 +0000 Subject: [PATCH] =?UTF-8?q?add=20demo/sectest/static=5Fpatch=5Fscan/2022-1?= =?UTF-8?q?2/OpenHarmony-SA-2022-1205.=20=E6=A3=80=E6=B5=8B=E6=BC=8F?= =?UTF-8?q?=E6=B4=9EOpenHarmony-SA-2022-1205=E6=98=AF=E5=90=A6=E8=A2=AB?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20=E5=BD=93=E5=90=88=E5=85=A5=E8=A1=A5?= =?UTF-8?q?=E4=B8=81=E4=B9=8B=E5=90=8E=EF=BC=8C=E4=BA=8C=E8=BF=9B=E5=88=B6?= =?UTF-8?q?=E6=96=87=E4=BB=B6/system/bin/appspawn=E4=B8=AD=E5=B0=86?= =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=AD=97=E7=AC=A6=E4=B8=B2=E2=80=9Dprocess?= =?UTF-8?q?=20name=20length=20is=200=E2=80=9C=EF=BC=8C=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E5=AD=97=E7=AC=A6=E4=B8=B2=E2=80=9Dprocess=20name=20error?= =?UTF-8?q?=E2=80=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: LIMBO <1132948658@qq.com> --- .../2022-12/OpenHarmony-SA-2022-1205 | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 demo/sectest/static_patch_scan/2022-12/OpenHarmony-SA-2022-1205 diff --git a/demo/sectest/static_patch_scan/2022-12/OpenHarmony-SA-2022-1205 b/demo/sectest/static_patch_scan/2022-12/OpenHarmony-SA-2022-1205 new file mode 100644 index 000000000..f6526ed69 --- /dev/null +++ b/demo/sectest/static_patch_scan/2022-12/OpenHarmony-SA-2022-1205 @@ -0,0 +1,35 @@ +# Copyright (C) 2023 Huawei Device Co., Ltd. +# +# 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" +import "elf" + +rule OpenHarmony_SA_2022_1205 +{ + meta: + date = "2023-01-10" + openharmony_sa = "OpenHarmony-SA-2022-1205" + cve = "CVE-2022-44455" + severity = "medium" + affacted_files = "appspawn" + affected_func = "CheckAppProperty" + + strings: + $features = "process name error" nocase wide ascii + $features1 = "process name length is 0" nocase wide ascii + + condition: + (elf.machine == elf.EM_ARM) and ($features and not $features1) and console.log("OpenHarmony-SA-2022-1205 testcase pass") + +} \ No newline at end of file -- GitLab