Skip to content

Fix buffer overflow in JETIEXBUS character reception #13130

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 21, 2023

Conversation

SteveCEvans
Copy link
Member

@SteveCEvans SteveCEvans commented Oct 21, 2023

This fixes a buffer overflow that resulted in an FC hang.

Fixes #12756

Credit to @klutvott123 for determining how to reliably reproduce this issue using the python script below to send a serial data stream to an FC using an FTDI serial adaptor, connecting the FTDI TX line to the FC TX line via a 1K resistor.

jetiexbus_test.py.zip

@github-actions
Copy link

Do you want to test this code? You can flash it directly from Betaflight Configurator:

  • Simply put #13130 (this pull request number) in the Select commit field of the Configurator firmware flasher tab (you need to Enable expert mode, Show release candidates and Development).

WARNING: It may be unstable. Use only for testing!

@SteveCEvans SteveCEvans changed the title Fix buffer overflow in jetiexbus character reception Fix buffer overflow in JETIEXBUS character reception Oct 21, 2023
@blckmn
Copy link
Member

blckmn commented Oct 21, 2023

AUTOMERGE: (FAIL)

  • github identifies PR as mergeable -> PASS
  • assigned to a milestone -> PASS
  • cooling off period lapsed -> FAIL
  • commit count less or equal to three -> PASS
  • Don't merge label NOT found -> PASS
  • at least one RN: label found -> PASS
  • Tested label found -> FAIL
  • assigned to an approver -> PASS
  • approver count at least three -> PASS

Copy link
Member

@klutvott123 klutvott123 left a comment

Choose a reason for hiding this comment

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

Thanks @SteveCEvans 👍
My test setup has been running this for a few hours now with no freeze

Co-authored-by: Mark Haslinghuis <mark@numloq.nl>
@SteveCEvans SteveCEvans merged commit eee0cb5 into betaflight:master Oct 21, 2023
haslinghuis added a commit to haslinghuis/betaflight that referenced this pull request Oct 23, 2023
* Fix buffer overflow in jetiexbus character reception

* Update src/main/rx/jetiexbus.c

Co-authored-by: Mark Haslinghuis <mark@numloq.nl>

---------

Co-authored-by: Mark Haslinghuis <mark@numloq.nl>
haslinghuis added a commit that referenced this pull request Oct 23, 2023
* Fix buffer overflow in jetiexbus character reception

* Update src/main/rx/jetiexbus.c



---------

Co-authored-by: Steve Evans <SteveCEvans@users.noreply.github.com>
davidbitton pushed a commit to davidbitton/betaflight that referenced this pull request Feb 5, 2024
* Fix buffer overflow in jetiexbus character reception

* Update src/main/rx/jetiexbus.c

Co-authored-by: Mark Haslinghuis <mark@numloq.nl>

---------

Co-authored-by: Mark Haslinghuis <mark@numloq.nl>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Flight Controller F7 freezes when JETIEXBUS is used on Betaflight 4.4 BF 4.4.0 RC3 Jeti Telemetrie broken (FC freeze when gcc10 is used)
4 participants