Digital Library

Fuzzing Android (Early Access) (Hamzeh Zawawy, Eugene Rodionov, Xuan Xing etc.) (z-library.sk, 1lib.sk, z-lib.sk)

,
,
,
,
,

Share E-Book

Fuzzing Android (Early Access) (Hamzeh Zawawy, Eugene Rodionov, Xuan Xing etc.) (z-library.sk, 1lib.sk, z-lib.sk)

Author

,
,
,
,
,

Rating No ratings yet

Log in to rate

Mobile
Language English

No Description

Format PDF
Size 2.3 MB
5
Views
(First 20 pages)

Registered users can read the full content for free

Register as a Gaohf Library member to read the complete e-book online for free and enjoy a better reading experience.

Page 1
EARLY ACCESS
Page 2
The Early Access program lets you read significant portions of an upcoming book while it’s still in the editing and production phases, so you may come across errors or other issues you want to comment on. But while we sincerely appreciate your feedback during a book’s EA phase, please use your best dis-cretion when deciding what to report. At the EA stage, we’re most interested in feedback related to content— general comments to the writer, technical errors, versioning concerns, or other high-level issues and observations. As these titles are still in draft form, we already know there may be typos, grammatical mistakes, miss- ing images or captions, layout issues, and instances of placeholder text. No need to report these—they will all be corrected later, during the copyedit- ing, proofreading, and typesetting processes. Please note that any online resources may not be available until the book is complete. If you encounter any errors (“errata”) you’d like to report, please fill out this Google form so we can review your comments. N O S T A R C H P R E S S E A R LY A C C E S S P R O G R A M : F E E D B A C K W E L C O M E !
Page 3
FUZZING ANDROID Fuzzing Android (Early Access) © 2026 by Hamzeh Zawawy, Eugene Rodionov, Xuan Xing, Kris Alder, Cory Barker, and Steven Moreland
Page 4
Fuzzing Android (Early Access) © 2026 by Hamzeh Zawawy, Eugene Rodionov, Xuan Xing, Kris Alder, Cory Barker, and Steven Moreland
Page 5
FUZZING ANDROID Finding Vulnerabilities in User Space and theKernel by Hamzeh Zawawy, Eugene Rodionov, Xuan Xing, Kris Alder, Cory Barker, and Steven Moreland ® San Francisco Fuzzing Android (Early Access) © 2026 by Hamzeh Zawawy, Eugene Rodionov, Xuan Xing, Kris Alder, Cory Barker, and Steven Moreland
Page 6
FUZZING ANDROID. Copyright © 2026 by Hamzeh Zawawy, Eugene Rodionov, Xuan Xing, Kris Alder, Cory Barker, and Steven Moreland. All rights reserved. No part of this work may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying, recording, or by any information storage or retrieval system, without the prior written permission of the copyright owner and the publisher. ISBN-13: 978-1-7185-0529-2 (print) ISBN-13: 978-1-7185-0530-8 (ebook) ™ Published by No Starch Press®, Inc. 245 8th Street, San Francisco, CA 94103 phone: +1.415.863.9900 www.nostarch.com; info@nostarch.com Publisher: William Pollock Managing Editor: Jill Franklin Production Manager: Sabrina Plomitallo-González Production Editor: Miles Bond Developmental Editor: Frances Saux Cover Illustrator: I. L. Strator Interior Design: Octopod Studios Technical Reviewer: Dominik Maier Copyeditor: Sharon Wilkey Proofreader: P. R. Øfreader Indexer: I. N. Dexer Library of Congress Cataloging-in-Publication Data TK For customer service inquiries, please contact info@nostarch.com. For information on distribution, bulk sales, corporate sales, or translations: sales@nostarch.com. For permission to translate this work: rights@nostarch.com. To report counterfeit copies or piracy: counterfeit@nostarch.com. The authorized representative in the EU for product safety and compliance is EU Compliance Partner, Pärnu mnt. 139b-14, 11317 Tallinn, Estonia, hello@eucompliancepartner.com, +3375690241. No Starch Press and the No Starch Press iron logo are registered trademarks of No Starch Press, Inc. Other product and company namesmentioned hereinmay be the trademarks of their respective owners. Rather than use a trademark symbol with every occurrence of a trademarked name, we are using the names only in an editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the trademark. The information in this book is distributed on an “As Is” basis, without warranty. While every precaution has been taken in the preparation of this work, neither the author nor No Starch Press, Inc. shall have any liability to any person or entity with respect to any loss or damage caused or alleged to be caused directly or indirectly by the information contained in it. Fuzzing Android (Early Access) © 2026 by Hamzeh Zawawy, Eugene Rodionov, Xuan Xing, Kris Alder, Cory Barker, and Steven Moreland
Page 7
About the Authors Hamzeh Zawawy, PhD, is a software engineering manager at Google who leads the Android Blue Team, focusing on systemic platform hardening and proactive security mitigations. He has a passion for software data analysis, having contributed to academic books on mining software logs, and oversees defensive engineering efforts across the Android ecosystem. Eugene Rodionov, PhD, is a security researcher and the Device and Platform Security tech lead at Google. He is a co-author of Rootkits and Bootkits (No Starch Press) and specializes in reverse engineering, vulnerability analysis, and low-level firmware security. He regularly presents his research on GPU and Binder exploitation at major conferences like Black Hat and DEF CON. Xuan Xing leads the Android Red Team at Google. He is passionate about fuzzing for security research. For the past several years, Xuan has focused on finding security vulnerabilities on Android/Pixel devices, using fuzzing as the primary approach. Kris Alder is a graduate of both Hacker Middle School and Brigham Young University. He works as a software engineer at Google. When he exits Vim, he enjoys skiing, archery, and board games. Cory Barker is a software engineer at Google specializing in Android plat- form security and fuzzing. He is dedicated to leveraging artificial intelli- gence to enhance security across the Android ecosystem. Steven Moreland has worked on Android architecture for nearly a decade, reinventing inter-process communication in Android, unifying the two inter- face description languages used in Android, and leading a team that fuzzed all C++ services in Android, among other things. About the Technical Reviewer Dominik Maier, PhD, is a security researcher on the Android Red Team at Google. He is a maintainer of the popular open source fuzzing frameworks AFL++ and LibAFL, and has co-authored several academic papers on fuzzing and baseband security. Fuzzing Android (Early Access) © 2026 by Hamzeh Zawawy, Eugene Rodionov, Xuan Xing, Kris Alder, Cory Barker, and Steven Moreland
Page 8
Fuzzing Android (Early Access) © 2026 by Hamzeh Zawawy, Eugene Rodionov, Xuan Xing, Kris Alder, Cory Barker, and Steven Moreland
Page 9
BRIEF CONTENTS Foreword . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xv Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvii Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xix PART I: INTRODUCTION TO FUZZING Chapter 1: What Is Fuzzing? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 Chapter 2: Preparing Android for Fuzzing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 Chapter 3: Tools and Frameworks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 PART II: TESTING ANDROID COMPONENTS Chapter 4: An Overview of Android Security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 Chapter 5: Choosing Your Targets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65 Chapter 6: Writing Your First Android Fuzz Harness . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77 Chapter 7: Crash Analysis and Bug Triage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93 PART III: ADVANCED TARGETS Chapter 8: System Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109 Chapter 9: The Android Kernel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123 Chapter 10: Writing a Syzkaller Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137 Chapter 11: Host-Based Fuzzing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167 Chapter 12: Fuzzing in the Age of AI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175 Fuzzing Android (Early Access) © 2026 by Hamzeh Zawawy, Eugene Rodionov, Xuan Xing, Kris Alder, Cory Barker, and Steven Moreland
Page 10
Fuzzing Android (Early Access) © 2026 by Hamzeh Zawawy, Eugene Rodionov, Xuan Xing, Kris Alder, Cory Barker, and Steven Moreland
Page 11
CONTENTS IN DETA IL FOREWORD xv ACKNOWLEDGMENTS xvii INTRODUCTION xix Who This Book Is For . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xx What’s in This Book? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xx Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxii PART I INTRODUCTION TO FUZZING 1 WHAT IS FUZZING? 3 Why Fuzz? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 The Fuzzing Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 Generating Random Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 Exercising the Code Under Test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 Evaluating Progress . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 Detecting Bad Behaviors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 Fuzzing vs. Other Testing Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 Unit Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 Integration Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 Fuzz Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 Wrapping Up . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 2 PREPARING ANDROID FOR FUZZING 15 Downloading Android . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 Setting Up Your Device . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 Physical Devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 Emulated Devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 The Soong Build System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 Defining Build Targets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 Building a Fuzz Target . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 Setting Build-Time Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 Fuzzing Android (Early Access) © 2026 by Hamzeh Zawawy, Eugene Rodionov, Xuan Xing, Kris Alder, Cory Barker, and Steven Moreland
Page 12
Installing ADB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 Testing the Fuzzing Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 With Cuttlefish . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 With a Physical Device . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 On Your Host Machine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 With AFL++ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 Wrapping Up . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 3 TOOLS AND FRAMEWORKS 27 Sanitizers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 Fuzzing Engines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 libFuzzer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 AFL++ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 LibAFL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 Syzkaller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 Data Parsing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 Manual Parsing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 With the FuzzedDataProvider Library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 With the libprotobuf-mutator Library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 Automating the Fuzzing Life Cycle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 Analyzing Lines Covered . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 Wrapping Up . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 PART II TESTING ANDROID COMPONENTS 4 AN OVERVIEW OF ANDROID SECURITY 45 Layers of the Android Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 Android’s Security Evolution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 Hardware-Based Security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 Trusted Execution Environments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 Secure Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 Protected Virtual Machines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 Fragmentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 Case Study: The Chinese Android Ecosystem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 Project Treble . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 Permissions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 How Apps Request Permissions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 Permission Escalation Attacks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 SELinux . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 How SELinux Works . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 Policy Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 x Contents in Detail Fuzzing Android (Early Access) © 2026 by Hamzeh Zawawy, Eugene Rodionov, Xuan Xing, Kris Alder, Cory Barker, and Steven Moreland
Page 13
Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 Shortcomings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 App Signing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 Wrapping Up . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 5 CHOOSING YOUR TARGETS 65 Library Evaluation Metrics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65 The Number of Dependent Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66 Reachability via Android Public APIs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67 The Days Since the First and Last Commit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 The Number of Distinct Contributors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 The Number of Lines Changed and Inserted . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70 The Vulnerability History . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70 Whether the Library Runs in Privileged Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71 Calculating a Criticality Score . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71 Determining a Library’s Critical Components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73 Measuring Complexity with Lizard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74 Finding Dangerous Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74 Before You Begin Fuzzing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75 Wrapping Up . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76 6 WRITING YOUR FIRST ANDROID FUZZ HARNESS 77 Fuzzing a Library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78 Creating an Empty Fuzz Harness . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78 Running the Harness . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80 Exercising the Library Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80 Disabling Error Logging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84 Understanding the Fuzzer’s Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85 Fixing Memory Leaks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86 Improving Fuzzer Performance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88 Adding a Dictionary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88 Collecting a Corpus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89 Adding a Seed Corpus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91 Wrapping Up . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91 7 CRASH ANALYSIS AND BUG TRIAGE 93 Initial Crash Validation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94 Do We Have Enough Information About the Bug? . . . . . . . . . . . . . . . . . . . . . . . . . . 94 Can We Reproduce the Issue? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96 Is It a Legitimate Bug? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98 Crash De-Duplication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99 Contents in Detail xi Fuzzing Android (Early Access) © 2026 by Hamzeh Zawawy, Eugene Rodionov, Xuan Xing, Kris Alder, Cory Barker, and Steven Moreland
Page 14
Making a Severity Assessment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100 Behavior . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101 Privilege Level . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102 Attack Vector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103 The Final Determination . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104 Wrapping Up . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106 PART III ADVANCED TARGETS 8 SYSTEM SERVICES 109 A Blueprint for Fuzzing Large Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110 Challenges of Black-Box Fuzzing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110 API Contract Enforcement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111 Fuzzing Binder Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113 Fuzzing Parcel Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113 Automating a Service Fuzzer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115 Fuzzing Multiple Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117 Optimizing Coverage: A Binder-Specific Example . . . . . . . . . . . . . . . . . . . . . . . . . . 119 Considering Structure-Aware Fuzzing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120 The Human Element of Large-Scale Fuzzing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121 Developing a Strategy for Scaling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121 Testing the Fuzzer Framework . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122 Wrapping Up . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122 9 THE ANDROID KERNEL 123 Why Kernel Fuzzing Is Special . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123 Preparing a Kernel for Fuzzing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124 Downloading and Building Kernel Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124 Turning on Fuzzing Instrumentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126 Syzkaller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127 Setting Up . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127 Getting to Know Syzkaller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128 Writing a Syzkaller Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128 Fuzzing Inside a Sandboxed Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131 Linux Kernel Library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132 The Structure of an LKL-based Fuzzer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133 Example: Fuzzing the Human Interface Device . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133 The High-Level Workflow for Constructing an LKL Fuzzer . . . . . . . . . . . . . . . . . . . . 134 Syzkaller vs. LKL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135 Wrapping Up . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135 xii Contents in Detail Fuzzing Android (Early Access) © 2026 by Hamzeh Zawawy, Eugene Rodionov, Xuan Xing, Kris Alder, Cory Barker, and Steven Moreland
Page 15
10 WRITING A SYZKALLER DESCRIPTION 137 Introducing a New Driver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137 Adding a Driver to the Kernel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138 Implementing the Lockbox . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140 Implementing the Padlock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144 Writing the Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149 Describing the Lockbox . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150 Describing the Padlock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151 Extracting Constants . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153 Fuzzing Your New Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156 Focusing on New Descriptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157 Introducing a Bug . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159 Running a Reproducer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163 Wrapping Up . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166 11 HOST-BASED FUZZING 167 What Counts as a Host? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167 Why Fuzz Android on the Host? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168 Challenges . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169 Enabling Host Fuzzing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170 Turning On the Flag . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170 Enabling the Host for All Dependencies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171 Mocking Platform-Specific Components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172 Host Fuzzing Beyond Android . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173 Wrapping Up . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174 12 FUZZING IN THE AGE OF AI 175 Fuzzing AI Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176 Automating the Fuzzing Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178 Solving Fuzzing’s Challenges . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179 With Gray-Box and White-Box Fuzzing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179 With LLM-Generated Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181 By Automating Structure-Aware Mutation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182 Auto-Triage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182 Crash De-duplication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183 Root Cause Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183 Remediation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183 Wrapping Up . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184 Contents in Detail xiii Fuzzing Android (Early Access) © 2026 by Hamzeh Zawawy, Eugene Rodionov, Xuan Xing, Kris Alder, Cory Barker, and Steven Moreland
Page 16
Fuzzing Android (Early Access) © 2026 by Hamzeh Zawawy, Eugene Rodionov, Xuan Xing, Kris Alder, Cory Barker, and Steven Moreland
Page 17
FOREWORD How does one secure a modern mobile operating system at global scale? To start, one should implement secure architectural designs, including sand- boxing, encryption, and the enforcement of information flow control poli- cies. But platforms like Android are exceptionally complex, relying on a large, trusted computing base that naturally creates a large attack surface. Attackers constantly probe this surface to find memory-safety vulnera- bilities that bypass architectural protections. So, memory-safety hardening is also vital, and Android has led the industry in transitioning to memory- safe systems software. For example, we mitigate memory vulnerabilities at their source by using Rust for low-level code, rather than C and C++. But the Linux kernel, low-level drivers, unsafe code blocks, and complex legacy components all present a challenge for Rust retrofits. Scaled fuzzing addresses this reality by automating the discovery of vul- nerabilities prior to shipping the code, effectively turning the relentless scaling of computation to the defender’s advantage. The authors of this text know the challenge of fuzzing large-scale software projects intimately; Hamzeh, Eugene, Xuan, Kris, Cory, and Steven have spent years securing Android, building the automated testing infrastructure that protects the platform today. Fuzzing Android is written for developers and security practitioners look- ing to master this practice and incorporate it effectively into human as well as agentic security workflows. If you need to fuzz components in Android or Linux, or if you want to understand how vulnerability research operates, this book delivers. It should teach any reader with a programming founda- tion how to write effective harnesses and even execute kernel fuzzing with tools like Syzkaller, providing the methodologies required to secure complex systems and ensuring that the next generation of mobile platforms remains safe for billions of users. David Kleidermacher Vice President, Platforms Security and Privacy, Google Fuzzing Android (Early Access) © 2026 by Hamzeh Zawawy, Eugene Rodionov, Xuan Xing, Kris Alder, Cory Barker, and Steven Moreland
Page 18
Fuzzing Android (Early Access) © 2026 by Hamzeh Zawawy, Eugene Rodionov, Xuan Xing, Kris Alder, Cory Barker, and Steven Moreland
Page 19
ACKNOWLEDGMENTS We are profoundly grateful to Dave Kleidermacher, who supported this project from the very beginning, and to Dominik Maier, who did an out- standing job as our technical reviewer. We also want to recognize Abhishek Arya, Oliver Chang, and Jonathan Metzman. Their work was foundational in launching and scaling Google’s fuzzing efforts from inception; while our paths diverged for the writing of this manuscript, this book simply would not exist without the groundwork they laid. To Pawan Wagh, thank you for all your work expanding binder fuzzing in Android and taking system fuzzing to the next level. Frederick Mayle and Devin Moore, thank you for your work solving some of the trickiest vulnera- bilities here. Sandeep Patil, thank you for your help and support in building cross-functional fuzzing across teams into our organization. To Martijn Coenen, thank you for showing Steven Moreland where to look for bugs in Binder in the first place. Jon Bottarini, thank you for championing fuzzing and helping to man- age the fuzzing project over the years. Fuzzing in Android represents hundreds of projects over a period of more than a decade, with more work being done all the time. To the count- less others who were involved, built infrastructure, or worked on this enor- mous project, not only at Google, but across hundreds of companies around the world, thank you. We would also like to honor the memory of Matt Alexander, a brilliant former colleague whose conversations first inspired the concepts behind the Linux Kernel Library fuzzing explored in this book. Writing a book, especially one with six authors, is a feat of coordination. To our editor, Frances Saux, thank you for helping make sense of all our Fuzzing Android (Early Access) © 2026 by Hamzeh Zawawy, Eugene Rodionov, Xuan Xing, Kris Alder, Cory Barker, and Steven Moreland
Page 20
manuscripts. This would not have been possible without your vigilance. To Bill Pollock, thank you for taking the time to be directly involved with this book. Steven Moreland would also like to thank his lovely fiancée, Dani Nghi, for tolerating his loud and incessant typing during the creation of this book. Kris Alder thanks his children, Charlie, Daniela, and Ian, for being effec- tive sources of entropy in life and exhibiting the most exciting, unexpected behaviors. Xuan Xing expresses his deepest gratitude to his wife, Rong, and his children, Roy and Iris, for graciously letting him borrow family weekends to finish this book. Cory Barker thanks his wonderful wife, Tiffany, and his two amazing kids, Perri Pongo and Jackie Danger. Finally, Hamzeh Zawawy expresses his deepest gratitude to his wife, Cheryl, for her support and patience throughout the long journey of bring- ing this book to life. To his sons, Amir and Yusuf, thank you for bringing so much joy to his days and for reminding him of what matters most. xviii Acknowledgments Fuzzing Android (Early Access) © 2026 by Hamzeh Zawawy, Eugene Rodionov, Xuan Xing, Kris Alder, Cory Barker, and Steven Moreland
The above is a preview of the first 20 pages. Register to read the complete e-book.

Recommended for You

Loading recommended books...
Failed to load, please try again later

Tip the Site

Scan the WeChat Pay or Alipay code to tip. No login required.

WeChat Pay
Alipay
← Back to List