Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

buffer overflow when built with D_FORTIFY_SOURCE=2 #5

Closed
Proscritt09 opened this issue Jun 11, 2022 · 5 comments
Closed

buffer overflow when built with D_FORTIFY_SOURCE=2 #5

Proscritt09 opened this issue Jun 11, 2022 · 5 comments
Assignees
Labels
bug Something isn't working can-reproduce-the-issue The issue has been reproduced

Comments

@Proscritt09
Copy link

Hi Zsnes team. I'm using Zsnes in EndeavourOS, a Arch Linux based distro.
Using Zsnes version 2.0.9-1 runs fine without errors, but after last upgrade (using pacman) to version 2.0.9-2, when I click run or enter in a terminal for any rom (this example using Actraiser 2 rom):

zsnes -s -r 3 ActRaiser\ 2\ \(U\)\ \[\!\].zip

It returns:
*** buffer overflow detected ***: terminated
Aborted (core dumped)

Any hints to solve this problem? Thanks in advance!
My specs:
https://clbin.com/Z8XID

@xyproto
Copy link
Owner

xyproto commented Jun 11, 2022

Thanks for reporting. This might be a packaging bug in Arch Linux, and not an issue with Zsnes.

Please add a comment to this bug report https://bugs.archlinux.org/task/75031, describing the steps that Arch Linux packagers can take to reproduce the issue, in order to be able to find a solution.

If you should wish to help out further to get to the bottom of this, then extracting the rom file from ActRaiser\ 2\ \(U\)\ \[\!\].zip and then moving it and renaming it to roms/snes/example.sfc in your home directory, and then running make clean debug in a clone of this zsnes repository would be a help. If you can then make it crash the bt full command will list very useful debug info.

Thanks!

@xyproto xyproto changed the title Zsnes 2.0.9-2 buffer overflow after last upgrade in Arch linux Distro buffer overflow after "export CXXFLAGS=${CXXFLAGS/-fcf-protection/}" was added to the Arch Linux zsnes package Jun 11, 2022
@xyproto xyproto self-assigned this Jun 11, 2022
@xyproto xyproto added the bug Something isn't working label Jun 11, 2022
@xyproto xyproto changed the title buffer overflow after "export CXXFLAGS=${CXXFLAGS/-fcf-protection/}" was added to the Arch Linux zsnes package buffer overflow after "export CXXFLAGS=${CXXFLAGS/-fcf-protection/}" was added to the Arch Linux zsnes package and/or gcc was upgraded Jun 11, 2022
@xyproto
Copy link
Owner

xyproto commented Jun 11, 2022

This is likely to be an old bug that is exposed by compiling with a newer version of gcc.

@xyproto
Copy link
Owner

xyproto commented Jun 12, 2022

What are the steps to reproduce the issue?

@xyproto xyproto added trying-to-reproduce-the-issue In the process of reproducing the issue waiting-for-response More info is needed labels Jun 12, 2022
@xyproto xyproto changed the title buffer overflow after "export CXXFLAGS=${CXXFLAGS/-fcf-protection/}" was added to the Arch Linux zsnes package and/or gcc was upgraded buffer overflow, could be an old bug exposed by the latest version of gcc Jun 12, 2022
@Proscritt09
Copy link
Author

Proscritt09 commented Jun 12, 2022 via email

@xyproto
Copy link
Owner

xyproto commented Jun 12, 2022

Thanks for the info! When building zsnes myself, Act Raiser 2 works fine here, both with the regular and the debug version of zsnes. I believe that this must be a packaging issue in Arch Linux.

(I maintain the zsnes package as well, but I'm not the one that last packaged it, and I currently don't have cryptographic keys to sign packages with, but I will have them not too far into the future).

@xyproto xyproto closed this as completed Jun 12, 2022
@xyproto xyproto changed the title buffer overflow, could be an old bug exposed by the latest version of gcc buffer overflow, most likely a packaging issue in Arch Linux Jun 12, 2022
@xyproto xyproto added can-reproduce-the-issue The issue has been reproduced and removed trying-to-reproduce-the-issue In the process of reproducing the issue waiting-for-response More info is needed labels Jun 13, 2022
@xyproto xyproto changed the title buffer overflow, most likely a packaging issue in Arch Linux buffer overflow when built with D_FORTIFY_SOURCE=2 Jun 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working can-reproduce-the-issue The issue has been reproduced
Projects
None yet
Development

No branches or pull requests

2 participants