Skip to content

Validate USB CDC port request terms before dispatch#2363

Open
pguyot wants to merge 1 commit into
atomvm:release-0.7from
pguyot:w29/fix-usb-cdc-port-validation
Open

Validate USB CDC port request terms before dispatch#2363
pguyot wants to merge 1 commit into
atomvm:release-0.7from
pguyot:w29/fix-usb-cdc-port-validation

Conversation

@pguyot

@pguyot pguyot commented Jul 18, 2026

Copy link
Copy Markdown
Collaborator

The rp2 and stm32 usb_cdc drivers indexed the $gen_call request term as a tuple without checking its shape, so an immediate could be dereferenced as a boxed pointer. Validate tuple and arity before indexing, and harden the rp2 create_port OOM path to unwind instead of aborting.

These changes are made under both the "Apache 2.0" and the "GNU Lesser General
Public License 2.1 or later" license terms (dual license).

SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later

The rp2 and stm32 usb_cdc drivers indexed the $gen_call request term as a
tuple without checking its shape, so an immediate could be dereferenced as
a boxed pointer. Validate tuple and arity before indexing, and harden the
rp2 create_port OOM path to unwind instead of aborting.

Signed-off-by: Paul Guyot <pguyot@kallisys.net>
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