Bug 2249220 - [abrt] lbrickbuster2: vsnprintf(): lbrickbuster2 killed by SIGABRT
Summary: [abrt] lbrickbuster2: vsnprintf(): lbrickbuster2 killed by SIGABRT
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: lbrickbuster2
Version: 39
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Hans de Goede
QA Contact: Fedora Extras Quality Assurance
URL: https://retrace.fedoraproject.org/faf...
Whiteboard: abrt_hash:84a23afbbb396842c4f17c2cf70...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-11-11 13:17 UTC by Ryan
Modified: 2024-01-29 07:53 UTC (History)
3 users (show)

Fixed In Version: lbrickbuster2-2.6.5-20.fc40 lbrickbuster2-2.6.5-20.fc39 lbrickbuster2-2.6.5-20.fc38
Clone Of:
Environment:
Last Closed: 2024-01-21 14:18:13 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
File: proc_pid_status (1.45 KB, text/plain)
2023-11-11 13:17 UTC, Ryan
no flags Details
File: limits (1.29 KB, text/plain)
2023-11-11 13:17 UTC, Ryan
no flags Details
File: dso_list (625 bytes, text/plain)
2023-11-11 13:17 UTC, Ryan
no flags Details
File: environ (2.90 KB, text/plain)
2023-11-11 13:17 UTC, Ryan
no flags Details
File: mountinfo (3.01 KB, text/plain)
2023-11-11 13:17 UTC, Ryan
no flags Details
File: open_fds (3.39 KB, text/plain)
2023-11-11 13:17 UTC, Ryan
no flags Details
File: backtrace (49.83 KB, text/plain)
2023-11-11 13:17 UTC, Ryan
no flags Details
File: os_info (699 bytes, text/plain)
2023-11-11 13:17 UTC, Ryan
no flags Details
File: core_backtrace (17.40 KB, text/plain)
2023-11-11 13:17 UTC, Ryan
no flags Details
File: var_log_messages (118 bytes, text/plain)
2023-11-11 13:17 UTC, Ryan
no flags Details
File: maps (3.99 KB, text/plain)
2023-11-11 13:17 UTC, Ryan
no flags Details
File: cpuinfo (2.71 KB, text/plain)
2023-11-11 13:17 UTC, Ryan
no flags Details

Description Ryan 2023-11-11 13:17:38 UTC
Description of problem:
started lbrickbuster2, immediately crashed. I was using wayland

Version-Release number of selected component:
lbrickbuster2-2.6.5-18.fc39

Additional info:
reporter:       libreport-2.17.11
runlevel:       N 5
backtrace_rating: 4
cgroup:         0::/user.slice/user-1000.slice/user/app.slice/app-lbrickbuster2-47a9d7fc8df0482988e6db3cf6afddfe.scope
comment:        started lbrickbuster2, immediately crashed. I was using wayland
type:           CCpp
package:        lbrickbuster2-2.6.5-18.fc39
journald_cursor: s=7132884b31154d9d9c123bd461b161ca;i=47445f;b=c7c385cbeaa04ed5bf1a0a0be6bb7a0b;m=113b76572;t=609e0252eda3e;x=50bf3e3b76141989
executable:     /usr/bin/lbrickbuster2
cmdline:        /usr/bin/lbrickbuster2
reason:         lbrickbuster2 killed by SIGABRT
crash_function: vsnprintf
kernel:         6.5.11-300.fc39.x86_64
uid:            1000
rootdir:        /

Truncated backtrace:
Thread no. 1 (2 frames)
 #8 vsnprintf at /usr/include/bits/stdio2.h:68
 #9 stk_surface_load at ../gui/stk.c:648

Comment 1 Ryan 2023-11-11 13:17:42 UTC
Created attachment 1998625 [details]
File: proc_pid_status

Comment 2 Ryan 2023-11-11 13:17:43 UTC
Created attachment 1998626 [details]
File: limits

Comment 3 Ryan 2023-11-11 13:17:45 UTC
Created attachment 1998627 [details]
File: dso_list

Comment 4 Ryan 2023-11-11 13:17:46 UTC
Created attachment 1998628 [details]
File: environ

Comment 5 Ryan 2023-11-11 13:17:48 UTC
Created attachment 1998629 [details]
File: mountinfo

Comment 6 Ryan 2023-11-11 13:17:49 UTC
Created attachment 1998630 [details]
File: open_fds

Comment 7 Ryan 2023-11-11 13:17:51 UTC
Created attachment 1998631 [details]
File: backtrace

Comment 8 Ryan 2023-11-11 13:17:52 UTC
Created attachment 1998632 [details]
File: os_info

Comment 9 Ryan 2023-11-11 13:17:54 UTC
Created attachment 1998633 [details]
File: core_backtrace

Comment 10 Ryan 2023-11-11 13:17:55 UTC
Created attachment 1998634 [details]
File: var_log_messages

Comment 11 Ryan 2023-11-11 13:17:56 UTC
Created attachment 1998635 [details]
File: maps

Comment 12 Ryan 2023-11-11 13:17:58 UTC
Created attachment 1998636 [details]
File: cpuinfo

Comment 13 Thomas Huth 2023-12-18 11:00:20 UTC
I just ran "lbrickbuster2" from a terminal window and the game immediately crashed (before opening a window)


reporter:       libreport-2.17.11
type:           CCpp
reason:         lbrickbuster2 killed by SIGABRT
executable:     /usr/bin/lbrickbuster2
cmdline:        lbrickbuster2
cgroup:         0::/user.slice/user-25666.slice/session-2.scope
rootdir:        /
kernel:         6.6.6-200.fc39.x86_64
package:        lbrickbuster2-2.6.5-18.fc39
runlevel:       N 5
backtrace_rating: 4
crash_function: vsnprintf
comment:        I just ran "lbrickbuster2" from a terminal window and the game immediately crashed (before opening a window)
mountinfo:      
environ:

Comment 14 Thomas Huth 2024-01-06 14:26:03 UTC
The following patch fixes the issue:

diff -u gui/stk.c.orig gui/stk.c
--- gui/stk.c.orig	2024-01-06 11:07:35.209249556 +0100
+++ gui/stk.c	2024-01-06 11:07:46.784327417 +0100
@@ -645,7 +645,7 @@
         ptr = path + strlen( path );
     }
     va_start( args, format );
-    vsnprintf( ptr, 511 - (path-ptr), format, args );
+    vsnprintf( ptr, sizeof(path) - (ptr - path), format, args );
     va_end( args );
 #ifdef STK_DEBUG
     printf( "loading %s\n", path );

Comment 15 Thomas Huth 2024-01-06 14:28:11 UTC
Also reported upstream now:

https://sourceforge.net/p/lgames/bugs/105/

(though lbreakout2 is marked as unmaintained there, so I'm not sure whether it will still get fixed there)

Comment 16 Hans de Goede 2024-01-06 14:33:00 UTC
(In reply to Thomas Huth from comment #14)
> The following patch fixes the issue:

Great, thank you for fixing this!

Bonus points if you can submit a pull-request with the fix here:
https://src.fedoraproject.org/rpms/lbrickbuster2

:)

Either way I'll try to make some time to get an update with this fix added pushed out sometime next week.

Comment 17 Thomas Huth 2024-01-21 08:21:44 UTC
It took a while to figure out how to do pull request there, but I think I mastered that now.

While doing so, I noticed that my patch was incomplete - there is another spot that needs the same fix, not sure why I didn't notice it earlier yet. Anyway, full patch looks like this:

diff -u lbreakout2-2.6.5/gui/stk.c.orig lbreakout2-2.6.5/gui/stk.c
--- lbreakout2-2.6.5/gui/stk.c.orig	2024-01-06 11:07:35.209249556 +0100
+++ lbreakout2-2.6.5/gui/stk.c	2024-01-06 11:07:46.784327417 +0100
@@ -645,7 +645,7 @@
         ptr = path + strlen( path );
     }
     va_start( args, format );
-    vsnprintf( ptr, 511 - (path-ptr), format, args );
+    vsnprintf( ptr, sizeof(path) - (ptr - path), format, args );
     va_end( args );
 #ifdef STK_DEBUG
     printf( "loading %s\n", path );
@@ -1352,7 +1352,7 @@
         ptr = path + strlen( path );
     }
     va_start( args, format );
-    vsnprintf( ptr, 511 - (path-ptr), format, args );
+    vsnprintf( ptr, sizeof(path) - (ptr - path), format, args );
     va_end( args );
 #ifdef STK_DEBUG
     printf( "loading %s\n", path );

Comment 18 Hans de Goede 2024-01-21 14:10:14 UTC
Thank you for both the improved fix and the pull-request!

I'm kicking of builds of this for F38 - F40 now, so updated packages fixing this should become available in Fedora 38's and 39's updates repository soon.

Comment 19 Fedora Update System 2024-01-21 14:14:59 UTC
FEDORA-2024-2fcce30eba has been submitted as an update to Fedora 40. https://bodhi.fedoraproject.org/updates/FEDORA-2024-2fcce30eba

Comment 20 Fedora Update System 2024-01-21 14:18:13 UTC
FEDORA-2024-2fcce30eba has been pushed to the Fedora 40 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 21 Fedora Update System 2024-01-21 14:25:12 UTC
FEDORA-2024-d7559eadff has been submitted as an update to Fedora 39. https://bodhi.fedoraproject.org/updates/FEDORA-2024-d7559eadff

Comment 22 Fedora Update System 2024-01-21 14:25:13 UTC
FEDORA-2024-3ce3943a78 has been submitted as an update to Fedora 38. https://bodhi.fedoraproject.org/updates/FEDORA-2024-3ce3943a78

Comment 23 Fedora Update System 2024-01-22 01:22:28 UTC
FEDORA-2024-d7559eadff has been pushed to the Fedora 39 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2024-d7559eadff`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-d7559eadff

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 24 Fedora Update System 2024-01-22 02:15:53 UTC
FEDORA-2024-3ce3943a78 has been pushed to the Fedora 38 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2024-3ce3943a78`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-3ce3943a78

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 25 Fedora Update System 2024-01-29 06:25:17 UTC
FEDORA-2024-d7559eadff has been pushed to the Fedora 39 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 26 Fedora Update System 2024-01-29 07:53:44 UTC
FEDORA-2024-3ce3943a78 has been pushed to the Fedora 38 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.