flat assembler
Message board for the users of flat assembler.

Index > Unix > FreeBSD and ELF GNU_STACK segment readable

Author
Thread Post new topic Reply to topic
MaoKo



Joined: 07 May 2019
Posts: 100
Location: Paris/French
MaoKo 11 Dec 2019, 04:25
Hello!! I think there is a problem with read only stack in FreeBSD.
On my machine the OS literally hangup. I can't shutdown it properly.
Even with this simple snippet:
Code:
format ELF64 executable $09
entry _start
segment executable readable
_start:
  mov rax, $01
  xor rdi, rdi
  syscall
segment gnustack readable
    

This seem to also affect 32-bits binary. My FreeBSD is currently at version 12.0.
But I've tested on 11.2 and the system hang too when I try to reboot it.
If anyone known about this. Hope this might help Smile.
Post 11 Dec 2019, 04:25
View user's profile Send private message Visit poster's website Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20333
Location: In your JS exploiting you and your system
revolution 11 Dec 2019, 04:28
I think it should be reported to the FreeBSD devs.
Post 11 Dec 2019, 04:28
View user's profile Send private message Visit poster's website Reply with quote
MaoKo



Joined: 07 May 2019
Posts: 100
Location: Paris/French
MaoKo 11 Dec 2019, 04:36
Yes you are right. But I'm not sure if it's really a bug. And read only stack segment is not easily generated by gcc/clang. I try to prevent fasm user of this. But yeah, I will try to report this as soon as possible Smile.
Post 11 Dec 2019, 04:36
View user's profile Send private message Visit poster's website Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20333
Location: In your JS exploiting you and your system
revolution 11 Dec 2019, 04:41
It looks like a bug to me. It shouldn't be possible for a user program to create a denial-of-service (aka a hang) for the entire system.
Post 11 Dec 2019, 04:41
View user's profile Send private message Visit poster's website Reply with quote
guignol



Joined: 06 Dec 2008
Posts: 763
guignol 11 Dec 2019, 11:51
Laughing
Post 11 Dec 2019, 11:51
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.