Commit Graph
8 Commits
Author SHA1 Message Date
neroices 047ad60b37 dipper: Update ArcSoft refocus blobs with UAF fix
Apply the teardown reorder patches to the ArcSoft dual-camera refocus
binaries to fix use-after-free SIGSEGV when switching out of portrait
mode.

Change-Id: Ib8c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1
2026-09-28 14:50:05 +00:00
Raya Mahardika d0dcc301f8 dipper: Patch libmpbase with SIMD tail padding
ArcSoft's dual-camera refocus library (libarcsoft_dualcam_refocus_rear_t.so)
executes a 2D convolution filter over image/disparity rows using NEON
instructions (vld1.32 {d28, d29, d30}, [r10]). Because it advances by
16 bytes per iteration but loads 24 bytes, the final iteration of each
row over-reads 8 bytes past the allocated buffer.

On Android 14/15, Scudo's memory layout enforces strict guard pages and
page unmapping. When an image buffer ends on a page boundary, this 8-byte
over-read triggers a fatal SEGV_MAPERR (SIGSEGV) at the adjacent page
boundary (e.g. 0xda005000), crashing the camera provider service when
capturing portrait photos in MIUI Camera.

All ArcSoft proprietary libraries route their allocations through
libmpbase's MMemAlloc, MMemRealloc, and MMemAllocStatic. Patch these
allocation functions to add 128 bytes of padding to every buffer,
ensuring all NEON sliding-window loads land safely within mapped memory.

Change-Id: Ib6fdc56e3b5493a9f808cdcce87d26dcdd914ed3
2026-09-23 23:28:57 +09:00
Bruno Martins bfdb8a7363 dipper: Regen vendor after enabling ELF checks
Change-Id: Idf7e5d62b99e0e0fa7c2f7a4b6d1b020de09d513
2025-04-13 18:11:10 +01:00
Bruno Martins ec61530098 dipper: Remove unused blobs
Change-Id: I3731468ea8b3c47de6a48732e085d72e2ffa6e13
2025-04-13 18:00:21 +01:00
Bruno Martins 6399409ff7 dipper: Update blobs from MIUI 12.5.2.0.QEACNXM
Change-Id: I6ca08096dc20aa65ffafe56d13d3cb03ee28f184
2025-01-27 23:55:10 +00:00
Bruno Martins cadf4b7812 dipper: Re-patch com.qti.node.watermark camera component
Command used during extraction:

 `patchelf --add-needed "libpiex_shim.so" "vendor/lib/camera/components/com.qti.node.watermark.so"`

Change-Id: Ie341b127967e07c4981a9709a04ba562f0ed287b
2022-11-01 11:08:59 +00:00
Bruno Martins 83ff190721 dipper: Patch com.qti.node.watermark camera component
Command used during extraction:

  `patchelf --add-needed "libpiex-v29.so" "vendor/lib/camera/components/com.qti.node.watermark.so"`

Change-Id: I704e4764a2f65ad690136c46cd966cc9cbea5f23
2022-09-20 12:39:56 +01:00
Bruno Martins fe85106cfb Import dipper from lineage-19.1 (8ee81e980)
Change-Id: I5f8a0f37a0440a5465e2cdeff27cc75b8dd2c6b2
2022-09-20 12:30:35 +01:00