Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • pulseaudio pulseaudio
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 897
    • Issues 897
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 56
    • Merge requests 56
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • PulseAudioPulseAudio
  • pulseaudiopulseaudio
  • Merge requests
  • !755

backend-native: Fix stack corruption reading RFCOMM AT+BIA= response

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Igor Kovalenko requested to merge igor.v.kovalenko/pulseaudio:pr/backend-native-fix-hfp-rfcomm-stack into master Nov 24, 2022
  • Overview 6
  • Commits 1
  • Pipelines 4
  • Changes 1

On-stack buffer size is too short for sscanf to read AT+BIA= and AT+BAC= response strings which have variable length.

Fix this by replacing sscanf with proper copy of input string.

Fixes: cca0d693 ("bluetooth: add AT+BIA support") of !631 (merged)

Problem call stack:

Program terminated with signal SIGABRT, Aborted.
[...]
#5  0x00007f63b9ccefe2 in __GI___fortify_fail (msg=msg@entry=0x7f63b9d4d0bd "stack smashing detected") at fortify_fail.c:26
#6  0x00007f63b9ccefc0 in __stack_chk_fail () at stack_chk_fail.c:24
#7  0x00007f63b17fb597 in hfp_rfcomm_handle (fd=24, t=0x560c901848f0, buf=0x7ffd6d6a1230 "AT+BIA=1,1,1,1,0,0\r") at ../src/modules/bluetooth/backend-native.c:814
Edited Nov 26, 2022 by Igor Kovalenko
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: pr/backend-native-fix-hfp-rfcomm-stack