ValveSoftware / Proton

Compatibility tool for Steam Play based on Wine and additional components
Other
24.46k stars 1.07k forks source link

Buffer overflow on exit for DS3, DS2:SOTFS, DS2, DS1: Prepare to Die (374320, 335300, 236430, 211420) #1962

Open HonkingGoose opened 5 years ago

HonkingGoose commented 5 years ago

Description of issue:

When running Steam from the terminal, these Dark Souls games have a buffer overflow when exiting the game:

Did not test: DARK SOULS™: REMASTERED (570940), I don't have this game. So I don't know if the remaster has this issue too...

Other games do not register a buffer overflow when exiting the game:

System Information


DARK SOULS™ III (374320) Buffer overflow.

steam-374320.log

Steps to reproduce DS3:

  1. Start Steam client from within terminal.
  2. Start DS3 by clicking on run.
  3. View the intro splash screens.
  4. Press A on "Press any button" prompt.
  5. Press A on "Patch notes information" prompt.
  6. Press D-pad up to select Quit.
  7. Press A to exit game. (Quit)
  8. Exit Steam.

Terminal output:

Running Steam on ubuntu 18.04 64-bit
STEAM_RUNTIME is enabled automatically
Pins up-to-date!
[2018-11-16 10:49:41] Startup - updater built Nov 10 2018 02:44:20
[2018-11-16 10:49:41] Opted in to client beta 'publicbeta' via beta file
You are in the 'publicbeta' client beta.
[2018-11-16 10:49:41] Verifying installation...
[2018-11-16 10:49:41] Verification complete
*** buffer overflow detected ***: Z:\home\giraffe\.steam\steam\steamapps\common\DARK SOULS III\Game\DarkSoulsIII.exe terminated
[2018-11-16 10:50:40] Shutdown

DARK SOULS™ II: Scholar of the First Sin (335300) Buffer overflow.

steam-335300.log

Steps to reproduce DS2:SOTFS:

  1. Start Steam client from within terminal.
  2. Start DS2:SOTFS by clicking on run.
  3. View the intro splash screens.
  4. Press A to start game.
  5. Press A to go past the "No new messages." message.
  6. Press D-pad up to select Quit.
  7. Press A to exit game. (Quit)
  8. Exit Steam.

Terminal output:

Running Steam on ubuntu 18.04 64-bit
STEAM_RUNTIME is enabled automatically
Pins up-to-date!
[2018-11-03 18:18:58] Startup - updater built Nov  2 2018 23:16:17
[2018-11-03 18:18:58] Opted in to client beta 'publicbeta' via beta file
You are in the 'publicbeta' client beta.
[2018-11-03 18:18:58] Verifying installation...
[2018-11-03 18:18:58] Verification complete
*** buffer overflow detected ***: Z:\home\giraffe\.steam\steam\steamapps\common\Dark Souls II Scholar of the First Sin\Game\DarkSoulsII.exe terminated
[2018-11-03 18:20:32] Shutdown

DARK SOULS™ II (236430) Buffer overflow.

steam-236430.log

Steps to reproduce DS2:

  1. Start Steam client from within terminal.
  2. Start DS2 by clicking on run.
  3. Press A to get past the "This game uses autosave" message.
  4. View the intro splash screens.
  5. Press A to close the welcoming messages.
  6. Press D-pad up to select Quit.
  7. Press A to exit game.
  8. Exit Steam.

Terminal output:

Running Steam on ubuntu 18.04 64-bit
STEAM_RUNTIME is enabled automatically
Pins up-to-date!
[2018-11-16 15:13:06] Startup - updater built Nov 10 2018 02:44:20
[2018-11-16 15:13:06] Opted in to client beta 'publicbeta' via beta file
You are in the 'publicbeta' client beta.
[2018-11-16 15:13:06] Verifying installation...
[2018-11-16 15:13:06] Verification complete
*** buffer overflow detected ***: /home/giraffe/.steam/steam/steamapps/common/Dark Souls II/Game/DarkSoulsII.exe terminated
[2018-11-16 15:13:54] Shutdown

DARK SOULS™: Prepare To Die Edition (211420) Buffer overflow.

steam-211420.log

Steps to reproduce DS: Prepare To Die:

  1. Start Steam client from within terminal.
  2. Start DS: Prepare To Die by clicking on run.
  3. Press A to go past the "This game uses autosave message".
  4. View intro splash screens.
  5. On main menu, press up on the D-pad twice to select Quit.
  6. Press A to quit.
  7. Exit Steam.

Terminal output:

Running Steam on ubuntu 18.04 64-bit
STEAM_RUNTIME is enabled automatically
Pins up-to-date!
[2018-11-16 11:40:46] Startup - updater built Nov 10 2018 02:44:20
[2018-11-16 11:40:46] Opted in to client beta 'publicbeta' via beta file
You are in the 'publicbeta' client beta.
[2018-11-16 11:40:46] Verifying installation...
[2018-11-16 11:40:46] Verification complete
*** buffer overflow detected ***: /home/giraffe/.steam/steam/steamapps/common/Dark Souls Prepare to Die Edition/DATA/DARKSOULS.exe terminated
[2018-11-16 11:41:31] Shutdown

The Awesome Adventures of Captain Spirit (845070) No buffer overflow.

steam-845070.log

Steps to reproduce Captain Spirit:

  1. Start Steam client from within terminal.
  2. Start Captain Spirit by clicking on run.
  3. View the intro splash screens.
  4. Use A to get to the main menu.
  5. Press D-pad up to select quit.
  6. Press A twice (once to select quit, once to really quit).
  7. Exit Steam.

Terminal output:

Running Steam on ubuntu 18.04 64-bit
STEAM_RUNTIME is enabled automatically
Pins up-to-date!
[2018-11-16 10:58:48] Startup - updater built Nov 10 2018 02:44:20
[2018-11-16 10:58:48] Opted in to client beta 'publicbeta' via beta file
You are in the 'publicbeta' client beta.
[2018-11-16 10:58:48] Verifying installation...
[2018-11-16 10:58:48] Verification complete
[2018-11-16 10:59:52] Shutdown

Sid Meier's Pirates! (3920) No buffer overflow:

steam-3920.log

Steps to reproduce Sid Meier's Pirates!:

  1. Start Steam client from within terminal.
  2. Start Sid Meier's Pirates! by clicking on run.
  3. View the intro splash screens.
  4. When the main menu is loaded, use the mouse to exit the game.
  5. Exit Steam.

Terminal output:

Running Steam on ubuntu 18.04 64-bit
STEAM_RUNTIME is enabled automatically
Pins up-to-date!
[2018-11-16 11:19:51] Startup - updater built Nov 10 2018 02:44:20
[2018-11-16 11:19:51] Opted in to client beta 'publicbeta' via beta file
You are in the 'publicbeta' client beta.
[2018-11-16 11:19:51] Verifying installation...
[2018-11-16 11:19:51] Verification complete
[2018-11-16 11:20:27] Shutdown

Airport Madness: World Edition (369290) No buffer overflow:

steam-369290.log

Steps to reproduce Airport Madness: World Edition:

  1. Start Steam client from within terminal.
  2. Start Airport Madness: World Edition by clicking on run.
  3. From the main menu use the mouse to click on Exit.
  4. Exit Steam.

Terminal output:

Running Steam on ubuntu 18.04 64-bit
STEAM_RUNTIME is enabled automatically
Pins up-to-date!
[2018-11-16 11:29:54] Startup - updater built Nov 10 2018 02:44:20
[2018-11-16 11:29:54] Opted in to client beta 'publicbeta' via beta file
You are in the 'publicbeta' client beta.
[2018-11-16 11:29:54] Verifying installation...
[2018-11-16 11:29:54] Verification complete
[2018-11-16 11:30:08] Shutdown

HonkingGoose commented 5 years ago

I've edited this issue, because DS3, DS2:SOTFS, DS2, and DS1:Prepare to Die all have the buffer overflow on exit. So it seems its an issue with the Souls games specifically...

It seemed the cleanest to me to update this issue report, instead of making 4 separate issue reports, so that all information is in one place, instead of scattered on 4 issue reports.

But maybe for tracking each overflow for each game, it might be better to separate out the issues?

So @kisak-valve, could you tell me which of these you prefer?

I've added Proton logs and steps to reproduce to this issue report, both for the affected games and for some not affected games, so that the developers can compare those logs and terminal output.

kisak-valve commented 5 years ago

Hello @HonkingGoose, as long as there's a decent chance the root cause is the same, there's no harm in tracking this issue across multiple game titles. For tracking purposes, I read this as Dark Souls III (whitelisted) has the issue, and the other Dark Souls titles are potentially providing additional hints.

If someone finds evidence that there's a difference between the games, we can re-evaluate later.

aeikum commented 5 years ago

Does this result in a problem playing the games?

HonkingGoose commented 5 years ago

Hello @aeikum The buffer overflow doesn't result in a problem playing the games. The buffer overflow seems to happen when exiting the games from the main menu in the normal manner.

From the wikipedia page on Buffer overflow:

Exploiting the behavior of a buffer overflow is a well-known security exploit. On many systems, the memory layout of a program, or the system as a whole, is well defined. By sending in data designed to cause a buffer overflow, it is possible to write into areas known to hold executable code and replace it with malicious code, or to selectively overwrite data pertaining to the program's state, therefore causing behavior that was not intended by the original programmer. Buffers are widespread in operating system (OS) code, so it is possible to make attacks that perform privilege escalation and gain unlimited access to the computer's resources.

This overflow might pose a security risk to users of Dark Souls games and/or Proton/wine. Therefore I thought I should report it, so that people with more knowledge can look into it.

HonkingGoose commented 5 years ago

Somebody seems to have some issues relating to the buffer overflow: https://github.com/ValveSoftware/Proton/issues/478#issuecomment-480461063

Quote (relevant part emphasized by me)

After updating to Ubuntu 18.10 Cosmic Cuttlefish I've been getting really bad stuttering on any version of Proton (even though the FPS is 60). When I restart my PC after playing the game I get a warning saying Buffer Overflow detected and it points to the Dark Souls III exe file.

Not sure why this started after upgrading my Ubuntu but would love a fix for it. Sick of restarting my PC just to stop it from lagging.

deathxxx123 commented 5 years ago

I always quit game with Alt+F4, and always get Buffer overflow like you. Cannot fix this, also it seems do not have any problems with performance or anything else.

dreamer commented 5 years ago

Seems like the crucial info is missing here: does this buffer overflow happen in Windows as well?