3.0 KiB
Security patch process
There is no automatic mechanism that applies AOSP security bulletin patches to
PawletOS. This is a manual, recurring task. This doc is the checklist; run
scripts/check_security_patch.py to find out whether it's time to do it.
Why manual
ro.build.version.security_patch (what Settings shows, what attestation
checks read) is baked into build.prop at build time from
PLATFORM_SECURITY_PATCH, which PawletOS sets via PAWLET_SECURITY_PATCH in
vendor/pawlet/config/version.mk. Nothing updates that date except a human
deciding a bulletin's patches have actually been backported. Setting the date
without doing the backport work is worse than leaving it stale — it's a false
claim of patch level to anything that checks it.
PawletOS also doesn't build against plain upstream AOSP for most components —
raspberry-vanilla's forks (kernel, build/make, build/soong, etc.) diverge
from stock AOSP hashes, so most bulletin patches don't cherry-pick cleanly.
Expect manual backport, not git cherry-pick, for anything touching a
raspberry-vanilla-forked repo.
Checklist
- Run
python3 PawletOS-Build/scripts/check_security_patch.py. If it says up to date, stop here. - Open the bulletin URL it prints (
source.android.com/docs/security/bulletin/YYYY-MM-DD). Read the component list — Framework, Media Framework, System, Kernel, vendor-specific (Qualcomm/MediaTek — not relevant to rpi4/5, skip those sections). - For each relevant CVE, find the linked AOSP Gerrit patch(es).
- For each patch, identify which PawletOS-tracked repo it targets
(
android_local_manifest/common/pawletos.xmlandandroid_local_manifest/rpi/vendor/brcm_rpi.xmllist every tracked project) and whether that repo is:- Untouched stock AOSP (still synced under its original name, no
<remove-project>/fork in the manifest) — cherry-pick should apply cleanly against the matching tag. - A raspberry-vanilla or PawletOS fork — diff the patch against the
fork's current state first (same technique as the update_engine/TWRP
comparisons: shallow-clone both,
diff -rqor a throwaway 3-way git merge, see how much actually conflicts) before hand-applying.
- Untouched stock AOSP (still synced under its original name, no
- Apply each patch (or its manual equivalent) to the relevant repo, build, confirm it doesn't break rpi4/rpi5.
- Bump
PAWLET_SECURITY_PATCHinvendor/pawlet/config/version.mkto the bulletin's date. - Bump
BOARD_AVB_ROLLBACK_INDEXin bothpawlet_rpi4/BoardConfig.mkandpawlet_rpi5/BoardConfig.mk— this is what actually blocks downgrade to a build missing the fix; the date bump alone is just a label. - Ship as an OTA per the normal release flow.
- Commit the version.mk/BoardConfig changes with the bulletin date in the
message so
git logon those files becomes a patch-history audit trail.
Cadence
Bulletins publish monthly (usually 1st, sometimes a mid-month supplemental on the 5th). Run the checker script periodically — cron it, or just run it before cutting any release build.