radareorg / radare2-extras

Source graveyard and random candy for radare2
http://www.radare.org/
GNU Lesser General Public License v3.0
238 stars 114 forks source link

Atombios create segmentation fault in r2 fault after installation #314

Closed sylvainpelissier closed 2 years ago

sylvainpelissier commented 2 years ago

Environment

Sun 11 Sep 09:39:18 CEST 2022
radare2 5.7.7 29258 @ linux-x86-64 git.5.7.6-291-gdc9f7df3bd
commit: dc9f7df3bd6dd3019bf531dd4a38acee31890293 build: 2022-09-11__09:19:46
Linux x86_64

Description

After Atombios is installed it creates segmentation fault when r2 is launched.

Test

$ r2pm -i atombios
$ r2 -
zsh: segmentation fault (core dumped)  r2 -

With gdb:

(gdb) r -
Starting program: /usr/local/bin/r2 -
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7e87f1b in buf_get_size (b=0x5555557172f0) at buf.c:44
44      return get_size? get_size (b): UT64_MAX;
(gdb) where
#0  0x00007ffff7e87f1b in buf_get_size (b=0x5555557172f0) at buf.c:44
#1  0x00007ffff7e888d2 in r_buf_size (b=0x5555557172f0) at buf.c:216
#2  0x00007ffff5f6938c in check_buffer (b=0x5555557172f0) at bin_atombios.c:20
#3  0x00007ffff7477d27 in r_bin_get_binplugin_by_buffer (bin=0x5555555a19e0, bf=0x5555557172f0, buf=0x5555556e0320) at bin.c:370
#4  0x00007ffff7488414 in get_plugin_from_buffer (bin=0x5555555a19e0, bf=0x5555557172f0, pluginname=0x0, buf=0x5555556e0320) at bfile.c:525
#5  0x00007ffff74888fa in r_bin_file_new_from_buffer (bin=0x5555555a19e0, file=0x5555556e0290 "malloc://512", buf=0x5555556e0320, rawstr=0, 
    baseaddr=18446744073709551615, loadaddr=0, fd=3, pluginname=0x0) at bfile.c:592
#6  0x00007ffff74778a9 in r_bin_open_buf (bin=0x5555555a19e0, buf=0x5555556e0320, opt=0x7fffffffd6d0) at bin.c:283
#7  0x00007ffff7477bb1 in r_bin_open_io (bin=0x5555555a19e0, opt=0x7fffffffd6d0) at bin.c:343
#8  0x00007ffff78218e6 in r_core_file_do_load_for_io_plugin (r=0x7ffff5fac010, baseaddr=18446744073709551615, loadaddr=0) at cfile.c:436
#9  0x00007ffff7822321 in r_core_bin_load (r=0x7ffff5fac010, filenameuri=0x5555556e0290 "malloc://512", baddr=18446744073709551615) at cfile.c:636
#10 0x00007ffff7e07d99 in r_main_radare2 (argc=2, argv=0x7fffffffdcc8) at radare2.c:1268
#11 0x0000555555555533 in main (argc=2, argv=0x7fffffffdcc8) at radare2.c:104