ตั้งแต่วันที่ 27 มีนาคม 2025 เป็นต้นไป เราขอแนะนำให้ใช้ android-latest-release
แทน aosp-main
เพื่อสร้างและมีส่วนร่วมใน AOSP โปรดดูข้อมูลเพิ่มเติมที่หัวข้อการเปลี่ยนแปลงใน AOSP
เปิดใช้โปรแกรมสร้างข้อมูลเท็จในอุปกรณ์ AAOS
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
นักพัฒนาซอฟต์แวร์ C++ จำนวนมากใช้การทดสอบแบบ Fuzz เพื่อค้นหาข้อบกพร่องที่เกี่ยวข้องกับความปลอดภัย
หน้านี้อธิบายหมวดหมู่ของโปรแกรมสร้างข้อมูลเท็จ AAOS (Android Automotive OS) และวิธีเรียกใช้บนอุปกรณ์เป้าหมายเฉพาะ AAOS
โปรแกรมสร้างข้อมูลเท็จ AAOS ที่มีอยู่
สร้างโปรแกรมสร้างข้อมูลเท็จในเป้าหมาย AAOS ในลักษณะเดียวกับที่คุณทำในแพลตฟอร์ม Android ดูวิธีการตั้งค่าและสร้างการทดสอบการใช้ Fuzzing ในหน้าการทดสอบการใช้ Fuzzing ด้วย libFuzzer
อย่างไรก็ตาม เส้นทางการดําเนินการของเป้าหมายการทดสอบแบบ Fuzz ใน AAOS จะแตกต่างจากในอุปกรณ์โทรศัพท์ Android ดังนั้นจึงจำเป็นต้องเรียกใช้โปรแกรมจำลองข้อบกพร่องที่เฉพาะเจาะจงในอุปกรณ์ AAOS เพื่อให้มั่นใจว่าไม่มีปัญหาด้านความปลอดภัย
โปรแกรมสร้างข้อมูลเท็จเฉพาะ AAOS แบ่งออกเป็นหมวดหมู่ต่อไปนี้
ดูรายการโปรแกรมจำลองข้อบกพร่องเฉพาะ AAOS ได้ในตารางต่อไปนี้
โปรแกรมสร้างข้อมูลเท็จของ EVS |
โปรแกรมสร้างข้อมูลเท็จของ Computepipe |
โปรแกรมสร้างข้อมูลเท็จอื่นๆ |
evs_halcamera_fuzzer |
computepipe _semantic_manager_fuzzer |
sbcdecoder_fuzzer |
evs_virtual_camera_fuzzer |
computepipe _pixel_mem_handle_fuzzer |
|
evs_haldisplay_fuzzer |
computepipe _pixel_stream_manager_fuzzer |
|
evs_enumerator_fuzzer |
grpc_graph_fuzzer |
|
|
local _prebuild_graph_fuzzer |
|
คอมไพล์โปรแกรมตรวจหาข้อบกพร่อง AAOS
เราขอแนะนำให้ใช้อุปกรณ์ HWASAN เพื่อเรียกใช้โปรแกรมจำลอง อย่างไรก็ตาม หากไม่ได้ใช้อุปกรณ์ HWASAN ให้ทำตามขั้นตอนต่อไปนี้เพื่อคอมไพล์และแฟลชอิมเมจ HWASAN ในเครื่อง
เรียกใช้คำสั่งต่อไปนี้เพื่อคอมไพล์บิลด์ hwasan
และแฟลชบิลด์ลงในระบบของรถยนต์
source build/envsetup.sh
lunch <car target>
SANITIZE_TARGET=hwaddress m
fastboot flashall # this will automatically flash the local built image to device
คอมไพล์โปรแกรมตรวจหาช่องโหว่สำหรับเครื่องมือจัดการ EVS โดยทำดังนี้
mmma packages/services/Car/cpp/evs/manager/1.1/test/fuzzer/
เรียกใช้โปรแกรมสร้างข้อมูลเท็จของ AAOS
เมื่อกําหนดค่าแล้ว ให้ทําตามขั้นตอนต่อไปนี้เพื่อเรียกใช้โปรแกรมสร้างข้อมูลเท็จ
เรียกใช้คำสั่งต่อไปนี้เพื่อเตรียมการซิงค์โปรแกรมตรวจหาข้อบกพร่องกับระบบ AAOS
adb root;
adb remount;
adb reboot;
adb root;
adb remount
หากไม่มีโฟลเดอร์ชื่อ /data/fuzzer ในอุปกรณ์ ให้สร้างโฟลเดอร์ขึ้นมา
ไปที่ตำแหน่งที่คุณดาวน์โหลดและแตกไฟล์บิลด์ จากนั้นเรียกใช้คำสั่งต่อไปนี้เพื่อพุชโปรแกรมตรวจหาช่องโหว่ในอุปกรณ์
adb sync data
หากต้องการพุชชุดทดสอบไปยังอุปกรณ์ ให้เรียกใช้คำสั่งต่อไปนี้
adb push testcase /data/fuzzer/testcase
เรียกใช้โปรแกรมตรวจหาช่องโหว่ด้วยคำสั่งต่อไปนี้
adb shell /data/fuzzer/evs_fuzzer /data/fuzzer/testcase
ยืนยันเอาต์พุต
การเรียกใช้ที่ประสบความสําเร็จจะสร้างเอาต์พุตที่คล้ายกับตัวอย่างต่อไปนี้
INFO: Seed: 1902496153
INFO: Loaded 4 modules (31463 inline 8-bit counters): 15646 [0x7afd3ddb80, 0x7afd3e189e), 15784 [0x7afd7fbbf0, 0x7afd7ff998), 27 [0x7afd618328, 0x7afd618343), 6 [0x63e95aece8, 0x63e95aecee),
INFO: Loaded 4 PC tables (31463 PCs): 15646 [0x7afd3e18a0,0x7afd41ea80), 15784 [0x7afd7ff998,0x7afd83d418), 27 [0x7afd618348,0x7afd6184f8), 6 [0x63e95aecf0,0x63e95aed50),
INFO: 0 files found in /data/fuzz/bot/inputs/fuzzer-testcases-disk/temp-671/new
INFO: 54 files found in /data/fuzz/bot/inputs/data-bundles/android_auto_libcrypto_utils_fuzzer
INFO: -max_len is not provided; libFuzzer will not generate inputs larger than 1048576 bytes
INFO: seed corpus: files: 54 min: 1b max: 4194301b total: 6336542b rss: 28Mb
#55 INITED cov: 71 ft: 94 corp: 6/1032Kb exec/s: 0 rss: 33Mb
#79 REDUCE cov: 71 ft: 94 corp: 6/1019Kb lim: 1048576 exec/s: 0 rss: 33Mb L: 1036131/1036131 MS: 4 CMP-ChangeASCIIInt-CopyPart-EraseBytes- DE: "\x00\x00\x00\x00"-
#83 REDUCE cov: 71 ft: 94 corp: 6/686Kb lim: 1048576 exec/s: 0 rss: 33Mb L: 694616/694616 MS: 4 ChangeASCIIInt-ChangeASCIIInt-ChangeBinInt-CrossOver-
#104 REDUCE cov: 71 ft: 94 corp: 6/591Kb lim: 1048576 exec/s: 0 rss: 33Mb L: 597426/597426 MS: 1 EraseBytes-
#192 REDUCE cov: 71 ft: 94 corp: 6/499Kb lim: 1048576 exec/s: 0 rss: 33Mb L: 503742/503742 MS: 3 PersAutoDict-ChangeByte-EraseBytes- DE: "\x00\x00\x00\x00"-
#219 REDUCE cov: 71 ft: 94 corp: 6/292Kb lim: 1048576 exec/s: 0 rss: 33Mb L: 290962/290962 MS: 2 CopyPart-EraseBytes-
#241 REDUCE cov: 71 ft: 94 corp: 6/226Kb lim: 1048576 exec/s: 0 rss: 33Mb L: 223787/223787 MS: 2 CopyPart-EraseBytes-
#269 REDUCE cov: 71 ft: 94 corp: 6/152Kb lim: 1048576 exec/s: 0 rss: 33Mb L: 148467/148467 MS: 3 InsertRepeatedBytes-PersAutoDict-EraseBytes- DE: "\x00\x00\x00\x00"-
#300 REDUCE cov: 71 ft: 94 corp: 6/83Kb lim: 1048576 exec/s: 0 rss: 33Mb L: 77320/77320 MS: 1 EraseBytes-
#393 REDUCE cov: 71 ft: 94 cor`p: 6/80Kb lim: 1048576 exec/s: 0 rss: 33Mb L: 73802/73802 MS: 3 InsertRepeatedBytes-P
การขัดข้องหรือการเรียกใช้ที่ไม่สําเร็จจะสร้างเอาต์พุตที่คล้ายกับตัวอย่างต่อไปนี้
HWAddressSanitizer: tag-mismatch on address 0x0075e8a643d0 at pc
0x0075e8a5d988 WRITE of size 8 at 0x0075e8a643d0 tags: 5c/00 (ptr/mem) in
thread T0 #0 0x75e8a5d984 (/system/lib64/libnetd_client.so+0x3984) #1
0x75da484788 (/data/fuzzer/lib/libc.so+0x49788) #2 0x75da52dae8
……
00000075e8a5d988 SUMMARY: HWAddressSanitizer: tag-mismatch
(/system/lib64/libnetd_client.so+0x3984)
ดูข้อมูลเกี่ยวกับช่องโหว่ด้านความปลอดภัยที่ตรวจพบได้ที่เว็บไซต์ CVE
ตัวอย่างเนื้อหาและโค้ดในหน้าเว็บนี้ขึ้นอยู่กับใบอนุญาตที่อธิบายไว้ในใบอนุญาตการใช้เนื้อหา Java และ OpenJDK เป็นเครื่องหมายการค้าหรือเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-06-26 UTC
[[["เข้าใจง่าย","easyToUnderstand","thumb-up"],["แก้ปัญหาของฉันได้","solvedMyProblem","thumb-up"],["อื่นๆ","otherUp","thumb-up"]],[["ไม่มีข้อมูลที่ฉันต้องการ","missingTheInformationINeed","thumb-down"],["ซับซ้อนเกินไป/มีหลายขั้นตอนมากเกินไป","tooComplicatedTooManySteps","thumb-down"],["ล้าสมัย","outOfDate","thumb-down"],["ปัญหาเกี่ยวกับการแปล","translationIssue","thumb-down"],["ตัวอย่าง/ปัญหาเกี่ยวกับโค้ด","samplesCodeIssue","thumb-down"],["อื่นๆ","otherDown","thumb-down"]],["อัปเดตล่าสุด 2025-06-26 UTC"],[],[],null,["# Enable fuzzers on AAOS devices\n\nA fuzz test is widely adopted by C++ developers to find security-related bugs.\nThis page describes the categories of AAOS (Android Automotive OS) fuzzers and\nhow to run them on AAOS-specific target devices.\n\nExisting AAOS fuzzers\n---------------------\n\nCreate fuzzers on AAOS targets the same way that you would on an Android\nPlatform. See fuzzing setup and build instructions on the [Fuzzing with\n`libFuzzer`](/docs/security/test/libfuzzer) page.\n\nHowever, the execution path of the fuzz target on AAOS is different from that on\nAndroid phone devices. Hence, it is necessary to run specific fuzzers on AAOS\ndevices to ensure that there are no security issues.\n\nAAOS specific fuzzers are divided into the following categories:\n\n- External View System (EVS) fuzzers: to fuzz the external camera management\n system. See [sample code for EVS\n fuzzers](https://cs.android.com/android/platform/superproject/+/android-latest-release:packages/services/Car/cpp/evs/manager/1.1/test/fuzzer/)\n for more details.\n\n- Computepipe fuzzers: to fuzz machine learning computepipe systems. See\n [sample code for Computepipe fuzzers](https://cs.android.com/android/platform/superproject/+/android-latest-release:packages/services/Car/cpp/computepipe/tests/fuzz/)\n for more details.\n\n- Other fuzzers: to fuzz AAOS libraries. See [sample code for the sbcdecoder\n fuzzer](https://cs.android.com/android/platform/superproject/+/android-latest-release:packages/modules/Bluetooth/system/embdrv/sbc/decoder/sbcdecoder_fuzzer.c?q=sbcdecoder_fuzzer.c)\n for more details.\n\nSee the following table for a list of AAOS specific fuzzers:\n\n| EVS fuzzers | Computepipe fuzzers | Other fuzzers |\n|-----------------------------|--------------------------------------------|---------------------|\n| `evs_halcamera_fuzzer` | `computepipe _semantic_manager_fuzzer` | `sbcdecoder_fuzzer` |\n| `evs_virtual_camera_fuzzer` | `computepipe _pixel_mem_handle_fuzzer` | |\n| `evs_haldisplay_fuzzer` | `computepipe _pixel_stream_manager_fuzzer` | |\n| `evs_enumerator_fuzzer` | `grpc_graph_fuzzer` | |\n| | `local _prebuild_graph_fuzzer` | |\n\nCompile an AAOS fuzzer\n----------------------\n\nWe recommend using a [HWASAN](/docs/security/test/hwasan) device for running\nfuzzers. However, when not using a HWASAN device, follow these steps to compile\nand flash a HWASAN image locally:\n\n1. Run the following commands to compile the `hwasan` build and flash the build\n to the car system.\n\n source build/envsetup.sh\n lunch \u003ccar target\u003e\n SANITIZE_TARGET=hwaddress m\n fastboot flashall # this will automatically flash the local built image to device\n\n2. Compile the fuzzer for EVS manager:\n\n mmma packages/services/Car/cpp/evs/manager/1.1/test/fuzzer/\n\nRun an AAOS fuzzer\n------------------\n\nOnce configured, follow these steps to run a fuzzer:\n\n1. Run the following commands to prepare syncing fuzzers to the AAOS system:\n\n adb root;\n adb remount;\n adb reboot;\n adb root;\n adb remount\n\n2. If you don't have a folder named /data/fuzzer on your device, create one.\n\n3. Go to where you downloaded and unzipped the build, and from there, run the\n following command to push the fuzzer on the device.\n\n adb sync data\n\n4. To push the testcase on the device, run the following:\n\n adb push testcase /data/fuzzer/testcase\n\n5. Run the fuzzer with the following command:\n\n adb shell /data/fuzzer/evs_fuzzer /data/fuzzer/testcase\n\n6. Verify the output.\n\n A successful run generates output similar to the following example: \n\n INFO: Seed: 1902496153\n INFO: Loaded 4 modules (31463 inline 8-bit counters): 15646 [0x7afd3ddb80, 0x7afd3e189e), 15784 [0x7afd7fbbf0, 0x7afd7ff998), 27 [0x7afd618328, 0x7afd618343), 6 [0x63e95aece8, 0x63e95aecee),\n INFO: Loaded 4 PC tables (31463 PCs): 15646 [0x7afd3e18a0,0x7afd41ea80), 15784 [0x7afd7ff998,0x7afd83d418), 27 [0x7afd618348,0x7afd6184f8), 6 [0x63e95aecf0,0x63e95aed50),\n INFO: 0 files found in /data/fuzz/bot/inputs/fuzzer-testcases-disk/temp-671/new\n INFO: 54 files found in /data/fuzz/bot/inputs/data-bundles/android_auto_libcrypto_utils_fuzzer\n INFO: -max_len is not provided; libFuzzer will not generate inputs larger than 1048576 bytes\n INFO: seed corpus: files: 54 min: 1b max: 4194301b total: 6336542b rss: 28Mb\n #55 INITED cov: 71 ft: 94 corp: 6/1032Kb exec/s: 0 rss: 33Mb\n #79 REDUCE cov: 71 ft: 94 corp: 6/1019Kb lim: 1048576 exec/s: 0 rss: 33Mb L: 1036131/1036131 MS: 4 CMP-ChangeASCIIInt-CopyPart-EraseBytes- DE: \"\\x00\\x00\\x00\\x00\"-\n #83 REDUCE cov: 71 ft: 94 corp: 6/686Kb lim: 1048576 exec/s: 0 rss: 33Mb L: 694616/694616 MS: 4 ChangeASCIIInt-ChangeASCIIInt-ChangeBinInt-CrossOver-\n #104 REDUCE cov: 71 ft: 94 corp: 6/591Kb lim: 1048576 exec/s: 0 rss: 33Mb L: 597426/597426 MS: 1 EraseBytes-\n #192 REDUCE cov: 71 ft: 94 corp: 6/499Kb lim: 1048576 exec/s: 0 rss: 33Mb L: 503742/503742 MS: 3 PersAutoDict-ChangeByte-EraseBytes- DE: \"\\x00\\x00\\x00\\x00\"-\n #219 REDUCE cov: 71 ft: 94 corp: 6/292Kb lim: 1048576 exec/s: 0 rss: 33Mb L: 290962/290962 MS: 2 CopyPart-EraseBytes-\n #241 REDUCE cov: 71 ft: 94 corp: 6/226Kb lim: 1048576 exec/s: 0 rss: 33Mb L: 223787/223787 MS: 2 CopyPart-EraseBytes-\n #269 REDUCE cov: 71 ft: 94 corp: 6/152Kb lim: 1048576 exec/s: 0 rss: 33Mb L: 148467/148467 MS: 3 InsertRepeatedBytes-PersAutoDict-EraseBytes- DE: \"\\x00\\x00\\x00\\x00\"-\n #300 REDUCE cov: 71 ft: 94 corp: 6/83Kb lim: 1048576 exec/s: 0 rss: 33Mb L: 77320/77320 MS: 1 EraseBytes-\n #393 REDUCE cov: 71 ft: 94 cor`p: 6/80Kb lim: 1048576 exec/s: 0 rss: 33Mb L: 73802/73802 MS: 3 InsertRepeatedBytes-P\n\n A crash or a failed run generates an output similar to the following\n example: \n\n HWAddressSanitizer: tag-mismatch on address 0x0075e8a643d0 at pc\n 0x0075e8a5d988 WRITE of size 8 at 0x0075e8a643d0 tags: 5c/00 (ptr/mem) in\n thread T0 #0 0x75e8a5d984 (/system/lib64/libnetd_client.so+0x3984) #1\n 0x75da484788 (/data/fuzzer/lib/libc.so+0x49788) #2 0x75da52dae8\n ......\n 00000075e8a5d988 SUMMARY: HWAddressSanitizer: tag-mismatch\n (/system/lib64/libnetd_client.so+0x3984)\n\nSee the [CVE](https://cve.mitre.org/) site for information on detected security\nvulnerabilities."]]