Skip to content
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

program execution is stopped with SIGBUS on FreeBSD #22899

Closed
niekgg opened this issue May 5, 2024 · 2 comments
Closed

program execution is stopped with SIGBUS on FreeBSD #22899

niekgg opened this issue May 5, 2024 · 2 comments

Comments

@niekgg
Copy link

niekgg commented May 5, 2024

Environment

> date
Sun May  5 21:14:01 +04 2024

> r2 -v
radare2 5.9.1 32110 @ freebsd-x86-64
birth: git.5.9.0-139-g5225ba580a 2024-05-03__15:31:16
commit: 5225ba580a1460928b61d83c70795e9e4311f67a
options: gpl -O? cs:5 cl:2 make

> uname -ms
FreeBSD amd64

Description

When debugging a simple program I receive a SIGBUS when I continue execution after a breakpoint on FreeBSD amd64 platform.

I have sysctl setting to give unprivileged process debugging capability

> sysctl -a security.bsd.unprivileged_proc_debug
security.bsd.unprivileged_proc_debug: 1

Test

> r2 -d  bin/simple_malloc/5.3.0/simple_malloc
WARN: Relocs has not been applied. Please use `-e bin.relocs.apply=true` or `-e bin.cache=true` next time
 -- Move between your search hits in visual mode using the 'n' and 'N' keys
[0x199fc8789b70]> db main
[0x199fc8789b70]> dc
[0x00201821]> s
0x201821
[0x00201821]> dc
INFO: Child stopped with signal 10
[+] signal 10 aka SIGBUS received 0 (Bus Error)
@niekgg
Copy link
Author

niekgg commented Jun 13, 2024

# copypaste this script into your shell and replace it with the output
date
Thu Jun 13 13:45:21 +04 2024

r2 -v
radare2 5.9.2 32319 @ freebsd-x86-64
birth: git.5.9.2 2024-06-13__13:48:28
commit: aea5c93a8f5a6ed360ea21d6a4e36f00accb8b7d
options: gpl -O? cs:5 cl:2 make
uname -ms
FreeBSD amd64

Description

problem is same child is stopped with signal this time with SIGSEGV. I don't know if breakpoint also gets hit
it doesn't say. any suggestions what should I test to provide more info ?

Test

> r2 -d bin/simple_malloc/5.3.0/simple_malloc
WARN: Relocs has not been applied. Please use `-e bin.relocs.apply=true` or `-e bin.cache=true` next time
 -- Use 'e asm.offset=true' to show offsets in 16bit segment addressing mode.
[0x1ba69672db70]> db main
[0x1ba69672db70]> dc
[0x00201821]> s
0x201821
[0x00201821]> dc
INFO: Child stopped with signal 11

@trufae
Copy link
Collaborator

trufae commented Sep 16, 2024

it should be fixed now

@trufae trufae closed this as completed Sep 16, 2024
@trufae trufae added this to the 5.9.6 - corteza milestone Sep 16, 2024
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

No branches or pull requests

2 participants