Skip to content

Limit the number of returned access technology settings#209

Merged
kstribrnAmzn merged 4 commits into
FreeRTOS:mainfrom
kstribrnAmzn:erdxList
Jul 2, 2026
Merged

Limit the number of returned access technology settings#209
kstribrnAmzn merged 4 commits into
FreeRTOS:mainfrom
kstribrnAmzn:erdxList

Conversation

@kstribrnAmzn

Copy link
Copy Markdown
Member

Description

Respect the maximum list size of eRDX configurations.

In the case of a cellular modem returning more eRDX settings through the AT+CEDRXS? query, the current library would write out of bounds. This would only happen in two cases:

  • misconfiguration - you should match the max eRDX settings to the chip through the CELLULAR_EDRX_LIST_MAX_SIZE macros
  • MITM attack - where the attacker intercepts the hardwired communication and returns a deliberately oversized response.

Test Steps

Unit test added

Checklist:

  • I have tested my changes. No regression in existing tests.
  • I have modified and/or added unit-tests to cover the code changes in this Pull Request.

Related Issue

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

cookpate
cookpate previously approved these changes Jul 2, 2026

@AniruddhaKanhere AniruddhaKanhere left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Approved!

NIT: can we also add an assert to this line like so: assert( count < CELLULAR_EDRX_LIST_MAX_SIZE );

This should never be called with more than
the maximum configured count. Assert if it
somehow is
@kstribrnAmzn kstribrnAmzn dismissed stale reviews from AniruddhaKanhere and cookpate via 53a96f3 July 2, 2026 20:09
@kstribrnAmzn

Copy link
Copy Markdown
Member Author

@AniruddhaKanhere updated to add the assertion.

@kstribrnAmzn kstribrnAmzn merged commit 6c5ea47 into FreeRTOS:main Jul 2, 2026
10 checks passed
@kstribrnAmzn kstribrnAmzn deleted the erdxList branch July 2, 2026 20:32
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.

4 participants