Bug 2249220
| Summary: | [abrt] lbrickbuster2: vsnprintf(): lbrickbuster2 killed by SIGABRT | ||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Ryan <stealthcipher> | ||||||||||||||||||||||||||
| Component: | lbrickbuster2 | Assignee: | Hans de Goede <hdegoede> | ||||||||||||||||||||||||||
| Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||||||||||||||||||||||||
| Severity: | unspecified | Docs Contact: | |||||||||||||||||||||||||||
| Priority: | unspecified | ||||||||||||||||||||||||||||
| Version: | 39 | CC: | hdegoede, stealthcipher, thuth | ||||||||||||||||||||||||||
| Target Milestone: | --- | Keywords: | Patch | ||||||||||||||||||||||||||
| Target Release: | --- | ||||||||||||||||||||||||||||
| Hardware: | x86_64 | ||||||||||||||||||||||||||||
| OS: | Unspecified | ||||||||||||||||||||||||||||
| URL: | https://retrace.fedoraproject.org/faf/reports/bthash/a53bf80e405964c1e382f6eea18f65e4404ecab | ||||||||||||||||||||||||||||
| Whiteboard: | abrt_hash:84a23afbbb396842c4f17c2cf7031dea3d0b7a00;VARIANT_ID=kde; | ||||||||||||||||||||||||||||
| Fixed In Version: | lbrickbuster2-2.6.5-20.fc40 lbrickbuster2-2.6.5-20.fc39 lbrickbuster2-2.6.5-20.fc38 | Doc Type: | If docs needed, set a value | ||||||||||||||||||||||||||
| Doc Text: | Story Points: | --- | |||||||||||||||||||||||||||
| Clone Of: | Environment: | ||||||||||||||||||||||||||||
| Last Closed: | 2024-01-21 14:18:13 UTC | Type: | --- | ||||||||||||||||||||||||||
| Regression: | --- | Mount Type: | --- | ||||||||||||||||||||||||||
| Documentation: | --- | CRM: | |||||||||||||||||||||||||||
| Verified Versions: | Category: | --- | |||||||||||||||||||||||||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||||||||||||||||||||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||||||||||||||||||||||||
| Embargoed: | |||||||||||||||||||||||||||||
| Attachments: |
|
||||||||||||||||||||||||||||
|
Description
Ryan
2023-11-11 13:17:38 UTC
Created attachment 1998625 [details]
File: proc_pid_status
Created attachment 1998626 [details]
File: limits
Created attachment 1998627 [details]
File: dso_list
Created attachment 1998628 [details]
File: environ
Created attachment 1998629 [details]
File: mountinfo
Created attachment 1998630 [details]
File: open_fds
Created attachment 1998631 [details]
File: backtrace
Created attachment 1998632 [details]
File: os_info
Created attachment 1998633 [details]
File: core_backtrace
Created attachment 1998634 [details]
File: var_log_messages
Created attachment 1998635 [details]
File: maps
Created attachment 1998636 [details]
File: cpuinfo
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: 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 );
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) (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. 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 );
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. FEDORA-2024-2fcce30eba has been submitted as an update to Fedora 40. https://bodhi.fedoraproject.org/updates/FEDORA-2024-2fcce30eba 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. FEDORA-2024-d7559eadff has been submitted as an update to Fedora 39. https://bodhi.fedoraproject.org/updates/FEDORA-2024-d7559eadff FEDORA-2024-3ce3943a78 has been submitted as an update to Fedora 38. https://bodhi.fedoraproject.org/updates/FEDORA-2024-3ce3943a78 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. 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. 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. 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. |