You are not logged in.

#1 2024-09-25 14:37:33

dtexetd
Member
Registered: 2024-09-25
Posts: 7

GDB - Input/Output Error Code 126

The file I'm trying to debug has a input/ouput error

The file and its dependencies have exec. permissions

output:

(gdb) r
Starting program: /home/dtexetd/Desktop/test/h/demo 
/usr/bin/bash: line 1: /home/dtexetd/Desktop/test/h/demo: Input/output error
/usr/bin/bash: line 1: /home/dtexetd/Desktop/test/h/demo: Success
During startup program exited with code 126.
(gdb) 

Offline

#2 2024-09-25 14:44:49

gromit
Package Maintainer (PM)
From: Germany
Registered: 2024-02-10
Posts: 1,134
Website

Re: GDB - Input/Output Error Code 126

Can you launch the executable without gdb? also whats the output of "file /home/dtexetd/Desktop/test/h/demo"?

Offline

#3 2024-09-25 15:01:38

dtexetd
Member
Registered: 2024-09-25
Posts: 7

Re: GDB - Input/Output Error Code 126

gromit wrote:

Can you launch the executable without gdb? also whats the output of "file /home/dtexetd/Desktop/test/h/demo"?

./demo

bash: ./demo: Input/output error

file demo

demo: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter ../.glibc/glibc_2.28_no-tcache/ld.so.2, for GNU/Linux 3.2.0, BuildID[sha1]=767e8320822fef96ebaeab4221088b81907ce17c, with debug_info, not stripped

Offline

#4 2024-09-25 15:14:48

gromit
Package Maintainer (PM)
From: Germany
Registered: 2024-02-10
Posts: 1,134
Website

Re: GDB - Input/Output Error Code 126

How did you build this executable?

Offline

#5 2024-09-25 15:19:04

seth
Member
Registered: 2012-09-03
Posts: 64,489

Re: GDB - Input/Output Error Code 126

126 is ENOKEY hmm

What exactly is "demo"?
And what process do you pass to gdb to get bash outputs?

Offline

#6 2024-09-25 19:25:58

dtexetd
Member
Registered: 2024-09-25
Posts: 7

Re: GDB - Input/Output Error Code 126

gromit wrote:

How did you build this executable?

I didn't create the binary

Offline

#7 2024-09-25 19:29:04

dtexetd
Member
Registered: 2024-09-25
Posts: 7

Re: GDB - Input/Output Error Code 126

seth wrote:

126 is ENOKEY hmm

What exactly is "demo"?
And what process do you pass to gdb to get bash outputs?

I just did "gdb demo" with no args

Offline

#8 2024-09-25 20:09:20

seth
Member
Registered: 2012-09-03
Posts: 64,489

Re: GDB - Input/Output Error Code 126

I didn't create the binary

Who/what did? Is is publically available? Do you have access to the source code? Can you share it?
Also

seth wrote:

What exactly is "demo"?

Offline

#9 2024-09-25 21:06:16

dtexetd
Member
Registered: 2024-09-25
Posts: 7

Re: GDB - Input/Output Error Code 126

seth wrote:

I didn't create the binary

Who/what did? Is is publically available? Do you have access to the source code? Can you share it?
Also

seth wrote:

What exactly is "demo"?

It's a course on udemy by Max Kamper

There's some downloads of the files on github

https://github.com/limitedeternity/HeapLAB
https://github.com/ivanmedina/Pwning/tr … AP/HeapLAB

You'll also need lib.so.6 for glibc 2.28 (it isn't in the repo)

../.glibc/glibc_2.28_no-tcache/libc.so.6

Offline

#10 2024-09-25 23:10:33

seth
Member
Registered: 2012-09-03
Posts: 64,489

Re: GDB - Input/Output Error Code 126

1. which one exactly? All of them?
2.

ldd demo
file ../.glibc/glibc_2.28_no-tcache/ld.so.2

Offline

Board footer

Powered by FluxBB