Skip to content

Conversation

@ffrancis123
Copy link
Contributor

@ffrancis123 ffrancis123 commented Jan 13, 2026

Add original free size check in do_alloc_block for
robustness and null check at gsl_shmem_alloc_ext call site.
Pointer subtraction returns signed ptrdiff_t, which can
overflow; convert pointers to uintptr_t before computing
offset. Also verify pointer positions: if addr < base,
skip within the same page and return error for newly
allocated page.

Shijie Lin and others added 3 commits January 13, 2026 20:35
Add null checks for heap_caldata_node and req_caldata_node
to avoid null pointer dereference crash.

Signed-off-by: ffrancis <[email protected]>
In case there is no voice call usecase present
in acdb file, voice call calibration chunk header
will still be present but with size zero, to avoid
erroring out in that scenario remove the
corresponding condition.

Signed-off-by: ffrancis <[email protected]>
Add original free size check in do_alloc_block for
robustness and null check at gsl_shmem_alloc_ext call site.
Pointer subtraction returns signed ptrdiff_t, which can
overflow; convert pointers to uintptr_t before computing
offset. Also verify pointer positions: if addr < base,
skip within the same page and return error for newly
allocated page.

Signed-off-by: ffrancis <[email protected]>
@ffrancis123 ffrancis123 requested review from a team January 13, 2026 15:08
@ffrancis123 ffrancis123 changed the title Upstream gsl: Avoid sub-overflow when calculating pointer offsets Jan 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant