• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (c) 2023 Huawei Device Co., Ltd.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *     http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17import "console"
18import "elf"
19
20
21rule OpenHarmony_SA_2022_1101
22{
23    meta:
24    	date = "2023-03-02"
25    	openharmony_sa = "OpenHarmony-SA-2022-1101"
26    	cve = "CVE-2022-43451"
27    	severity = "high"
28    	affacted_files = "nwebspawn"
29    	affected_func = "main"
30
31    strings:
32        $features = "strncpy_s appspawn server name error" nocase wide ascii
33
34    condition:
35        (elf.machine == elf.EM_ARM) and $features and console.log("OpenHarmony-SA-2022-1101 testcase pass")
36
37}
38