[Bug] GEF Command BufferOverflow inside GDB
bugconfirmed
### GEF+GDB version
```shell
GDB: GNU gdb (Fedora Linux) 16.3-6.fc43
GEF: The latest you get from `$ bash -c "$(curl -fsSL https://gef.blah.cat/sh)"`
```
### Operating System
Fedora Linux x86_64
### Describe the issue you encountered
I created a simple elf64 from my asm code, compiled it and loaded it into gdb with gef installed, gef errors out with a buffer overflow, when trying to run `gef` inside gdb
### Do you read the docs and look at previously closed issues/PRs for similar cases?
Yes
### Architecture impacted
- [ ] X86
- [x] X64
- [ ] ARM
- [ ] ARM64
- [ ] MIPS
- [ ] MIPS64
- [ ] PPC
- [ ] PPC64
- [ ] RISCV
### Describe your issue. Without a proper reproduction step-by-step, your issue will be ignored.
1. Install newest version of gef
2. load elf64 binary into gdb
3. try to run gef
4. buffer overflow error
```
gef➤ gef
Python Exception <class 'SystemError'>: buffer overflow
Python Exception <class 'gdb.error'>: Error occurred in Python: buffer overflow
Error occurred in Python: Error occurred in Python: buffer overflow
```
### Minimalist test case
Use this field for a minimal code to compile and spot the issue:
```asm
global _start
section .data
message db "Hello World!"
length equ $-message
section .text
_start:
mov rax, 1
mov rdi, 1
mov rsi, message
mov rdx, length
syscall
mov rax, 60
mov rdi, 0
syscall
```
nasm -f elf64 hello.asm && ld hello.o
### Additional context?
Python Exception <class 'SystemError'>: buffer overflow
Python Exception <class 'gdb.error'>: Error occurred in Python: buffer overflow
Error occurred in Python: Error occurred in Python: buffer overflow
5 条评论