FreeDroidRPG segfaults when loading a save file

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

FreeDroidRPG segfaults when loading a save file

Leonid Bobrov
Hello, trash!

First of all I am not going to recompile this game with debugging
symbols only because your ports system doesn't want to compile
everything with debug support by default.

Second, my first thought was that this game is so retarded it crashes
when OpenBSD's src repo is not checked out, but now I won't surprice
if that was a buffer overflow.

Before checking out src repo:
(gdb) run -wn
Starting program: /usr/local/bin/freedroidRPG -wn

Hello, this is FreedroidRPG, version 0.16.1.

Video system type: x11.
Using screen resolution 1366 x 768.
[New thread 287207]
[New thread 189085]

Thread 1 received signal SIGSEGV, Segmentation fault.
strcmp () at /usr/src/lib/libc/arch/amd64/string/strcmp.S:45
45      /usr/src/lib/libc/arch/amd64/string/strcmp.S: No such file or
directory.
(gdb) bt
#0  strcmp () at /usr/src/lib/libc/arch/amd64/string/strcmp.S:45
#1  0x00000bc6e628a46d in convert_old_savegame ()
#2  0x00000bc6e624f798 in load_saved_game ()
#3  0x00000bc6e62447b3 in load_named_game ()
#4  0x00000bc6e6245200 in do_savegame_selection_and_act ()
#5  0x00000bc6e6244b59 in Single_Player_Menu ()
#6  0x00000bc6e6242c67 in Startup_handle ()
#7  0x00000bc6e6244d23 in RunSubMenu ()
#8  0x00000bc6e62446d7 in RunMenu ()
#9  0x00000bc6e623c4b5 in main ()

After checking out src repo:
(gdb) run -wn
Starting program: /usr/local/bin/freedroidRPG -wn

Hello, this is FreedroidRPG, version 0.16.1.

Video system type: x11.
Using screen resolution 1366 x 768.
[New thread 110599]
[New thread 575572]

Thread 1 received signal SIGSEGV, Segmentation fault.
strcmp () at /usr/src/lib/libc/arch/amd64/string/strcmp.S:45
45              movq    8(%rdi),%rax
(gdb) bt
#0  strcmp () at /usr/src/lib/libc/arch/amd64/string/strcmp.S:45
#1  0x00001e0e2638a46d in convert_old_savegame ()
#2  0x00001e0e2634f798 in load_saved_game ()
#3  0x00001e0e263447b3 in load_named_game ()
#4  0x00001e0e26345200 in do_savegame_selection_and_act ()
#5  0x00001e0e26344b59 in Single_Player_Menu ()
#6  0x00001e0e26342c67 in Startup_handle ()
#7  0x00001e0e26344d23 in RunSubMenu ()
#8  0x00001e0e263446d7 in RunMenu ()
#9  0x00001e0e2633c4b5 in main ()

Reply | Threaded
Open this post in threaded view
|

Re: FreeDroidRPG segfaults when loading a save file

Gregor Best-2
On Wed, Sep 05, 2018 at 06:17:42PM +0300, Leonid Bobrov wrote:
> Hello, trash!
> [...]

Do you kiss your mother with that mouth?

> [...]
> First of all I am not going to recompile this game with debugging
> symbols only because your ports system doesn't want to compile
> everything with debug support by default.
> [...]

Kind of a sane default, it seems to me.

> [...]
> Second, my first thought was that this game is so retarded
> [...]

I know that you might be agitated that the game's not working. Using
that kind of language doesn't incline people to help you though.

> [...]
> it crashes when OpenBSD's src repo is not checked out
> [...]

What made you think that?

> [...]
> , but now I won't > surprice if that was a buffer overflow.
> [...]

To me, this looks more like an unterminated string fed to strcmp(3).
The point of code where it crashes (convert_old_savegame) leads me
to assume that this path of code might not be too well tested.

Have you opened a bug report upstream for this?

Failing that, you could poke around convert_old_savegame and try
to see if you can discover where and how an unterminated string ends
up in a call to strcmp. Maybe it's something as simple as adding a
NULL check before that call...

> [...]
> Before checking out src repo:
> (gdb) run -wn
> Starting program: /usr/local/bin/freedroidRPG -wn
>
> Hello, this is FreedroidRPG, version 0.16.1.
>
> Video system type: x11.
> Using screen resolution 1366 x 768.
> [New thread 287207]
> [New thread 189085]
>
> Thread 1 received signal SIGSEGV, Segmentation fault.
> strcmp () at /usr/src/lib/libc/arch/amd64/string/strcmp.S:45
> 45      /usr/src/lib/libc/arch/amd64/string/strcmp.S: No such file or
> directory.
> (gdb) bt
> #0  strcmp () at /usr/src/lib/libc/arch/amd64/string/strcmp.S:45
> #1  0x00000bc6e628a46d in convert_old_savegame ()
> #2  0x00000bc6e624f798 in load_saved_game ()
> #3  0x00000bc6e62447b3 in load_named_game ()
> #4  0x00000bc6e6245200 in do_savegame_selection_and_act ()
> #5  0x00000bc6e6244b59 in Single_Player_Menu ()
> #6  0x00000bc6e6242c67 in Startup_handle ()
> #7  0x00000bc6e6244d23 in RunSubMenu ()
> #8  0x00000bc6e62446d7 in RunMenu ()
> #9  0x00000bc6e623c4b5 in main ()
>
> After checking out src repo:
> (gdb) run -wn
> Starting program: /usr/local/bin/freedroidRPG -wn
>
> Hello, this is FreedroidRPG, version 0.16.1.
>
> Video system type: x11.
> Using screen resolution 1366 x 768.
> [New thread 110599]
> [New thread 575572]
>
> Thread 1 received signal SIGSEGV, Segmentation fault.
> strcmp () at /usr/src/lib/libc/arch/amd64/string/strcmp.S:45
> 45              movq    8(%rdi),%rax
> (gdb) bt
> #0  strcmp () at /usr/src/lib/libc/arch/amd64/string/strcmp.S:45
> #1  0x00001e0e2638a46d in convert_old_savegame ()
> #2  0x00001e0e2634f798 in load_saved_game ()
> #3  0x00001e0e263447b3 in load_named_game ()
> #4  0x00001e0e26345200 in do_savegame_selection_and_act ()
> #5  0x00001e0e26344b59 in Single_Player_Menu ()
> #6  0x00001e0e26342c67 in Startup_handle ()
> #7  0x00001e0e26344d23 in RunSubMenu ()
> #8  0x00001e0e263446d7 in RunMenu ()
> #9  0x00001e0e2633c4b5 in main ()
>

--
        Gregor

Reply | Threaded
Open this post in threaded view
|

Re: FreeDroidRPG segfaults when loading a save file

Brian Callahan-3
It shouldn't need to be said but I'm going to say it anyway. Don't feed
the troll. He said something equally as obnoxious earlier today on
tech@. Just disengage, add him to your email blacklist, and move on.

~Brian

On 09/05/18 12:02, Gregor Best wrote:

> On Wed, Sep 05, 2018 at 06:17:42PM +0300, Leonid Bobrov wrote:
>> Hello, trash!
>> [...]
> Do you kiss your mother with that mouth?
>
>> [...]
>> First of all I am not going to recompile this game with debugging
>> symbols only because your ports system doesn't want to compile
>> everything with debug support by default.
>> [...]
> Kind of a sane default, it seems to me.
>
>> [...]
>> Second, my first thought was that this game is so retarded
>> [...]
> I know that you might be agitated that the game's not working. Using
> that kind of language doesn't incline people to help you though.
>
>> [...]
>> it crashes when OpenBSD's src repo is not checked out
>> [...]
> What made you think that?
>
>> [...]
>> , but now I won't > surprice if that was a buffer overflow.
>> [...]
> To me, this looks more like an unterminated string fed to strcmp(3).
> The point of code where it crashes (convert_old_savegame) leads me
> to assume that this path of code might not be too well tested.
>
> Have you opened a bug report upstream for this?
>
> Failing that, you could poke around convert_old_savegame and try
> to see if you can discover where and how an unterminated string ends
> up in a call to strcmp. Maybe it's something as simple as adding a
> NULL check before that call...
>
>> [...]
>> Before checking out src repo:
>> (gdb) run -wn
>> Starting program: /usr/local/bin/freedroidRPG -wn
>>
>> Hello, this is FreedroidRPG, version 0.16.1.
>>
>> Video system type: x11.
>> Using screen resolution 1366 x 768.
>> [New thread 287207]
>> [New thread 189085]
>>
>> Thread 1 received signal SIGSEGV, Segmentation fault.
>> strcmp () at /usr/src/lib/libc/arch/amd64/string/strcmp.S:45
>> 45      /usr/src/lib/libc/arch/amd64/string/strcmp.S: No such file or
>> directory.
>> (gdb) bt
>> #0  strcmp () at /usr/src/lib/libc/arch/amd64/string/strcmp.S:45
>> #1  0x00000bc6e628a46d in convert_old_savegame ()
>> #2  0x00000bc6e624f798 in load_saved_game ()
>> #3  0x00000bc6e62447b3 in load_named_game ()
>> #4  0x00000bc6e6245200 in do_savegame_selection_and_act ()
>> #5  0x00000bc6e6244b59 in Single_Player_Menu ()
>> #6  0x00000bc6e6242c67 in Startup_handle ()
>> #7  0x00000bc6e6244d23 in RunSubMenu ()
>> #8  0x00000bc6e62446d7 in RunMenu ()
>> #9  0x00000bc6e623c4b5 in main ()
>>
>> After checking out src repo:
>> (gdb) run -wn
>> Starting program: /usr/local/bin/freedroidRPG -wn
>>
>> Hello, this is FreedroidRPG, version 0.16.1.
>>
>> Video system type: x11.
>> Using screen resolution 1366 x 768.
>> [New thread 110599]
>> [New thread 575572]
>>
>> Thread 1 received signal SIGSEGV, Segmentation fault.
>> strcmp () at /usr/src/lib/libc/arch/amd64/string/strcmp.S:45
>> 45              movq    8(%rdi),%rax
>> (gdb) bt
>> #0  strcmp () at /usr/src/lib/libc/arch/amd64/string/strcmp.S:45
>> #1  0x00001e0e2638a46d in convert_old_savegame ()
>> #2  0x00001e0e2634f798 in load_saved_game ()
>> #3  0x00001e0e263447b3 in load_named_game ()
>> #4  0x00001e0e26345200 in do_savegame_selection_and_act ()
>> #5  0x00001e0e26344b59 in Single_Player_Menu ()
>> #6  0x00001e0e26342c67 in Startup_handle ()
>> #7  0x00001e0e26344d23 in RunSubMenu ()
>> #8  0x00001e0e263446d7 in RunMenu ()
>> #9  0x00001e0e2633c4b5 in main ()
>>

Reply | Threaded
Open this post in threaded view
|

Re: FreeDroidRPG segfaults when loading a save file

Stuart Henderson
On 2018/09/05 13:05, Brian Callahan wrote:
> It shouldn't need to be said but I'm going to say it anyway. Don't feed the
> troll. He said something equally as obnoxious earlier today on tech@. Just
> disengage, add him to your email blacklist, and move on.

https://www.youtube.com/watch?v=jclPWidTfak

Reply | Threaded
Open this post in threaded view
|

Re: FreeDroidRPG segfaults when loading a save file

Leonid Bobrov
In reply to this post by Leonid Bobrov
Hello, cruds!

> Do you kiss your mother with that mouth?

Rofl, you are just like kids in my town.

> Kind of a sane default, it seems to me.

No, you retard, ports compiled without debug symbols is insane default,
I am annoyed to see "send a backtrace" everytime I catch crashes, you
retards require me to recompile with debug symbols. Fuck you! I am not
going to spend 6-12 hours compiling webkit.

> Have you opened a bug report upstream for this?

Until you provide me a binary with debug symbols sending a bug report
upstream won't be helpful.

> It shouldn't need to be said but I'm going to say it anyway. Don't feed the
> troll. He said something equally as obnoxious earlier today on tech@. Just
> disengage, add him to your email blacklist, and move on.

So, when I am angry because you and your ports system are retarded you
call me a troll, but actually I see you are the troll, only such crud
like you will require a user with slow hardware to compile every app
with debug symbols.

I am really irritated, you three have done a great job trolling me. I
regret that I am feeding you, scum.