Skip to content

NFC: Fix BusFault in Write to Initial Card#4362

Open
akrylysov wants to merge 1 commit intoflipperdevices:devfrom
akrylysov:nfc-write-initial-fix
Open

NFC: Fix BusFault in Write to Initial Card#4362
akrylysov wants to merge 1 commit intoflipperdevices:devfrom
akrylysov:nfc-write-initial-fix

Conversation

@akrylysov
Copy link

What's new

Fixes #4108.

mode_ctx is a union where write_ctx.tag_block overlaps with dict_attack_ctx.nested_nonce.nonces. In "Write to Initial Card" it causes mf_classic_poller_free calling free() on a garbage pointer.

Verification

Built the firmware with the fix and tested with a key fob and an nfc file that caused a crash.

Checklist (For Reviewer)

  • PR has description of feature/bug or link to Confluence/Jira task
  • Description contains actions to verify feature/bugfix
  • I've built this code, uploaded it to the device and verified feature/bugfix

mode_ctx is a union where write_ctx.tag_block overlaps with dict_attack_ctx.nested_nonce.nonces. In "Write to Initial Card" it causes mf_classic_poller_free calling free on a garbage pointer
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.

NFC bus fault

1 participant