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

SIGSEGV when analyzing RAR containing 3 CBZ comics #1826

Closed
5 tasks done
lucaswiecki opened this issue Jan 13, 2025 · 4 comments
Closed
5 tasks done

SIGSEGV when analyzing RAR containing 3 CBZ comics #1826

lucaswiecki opened this issue Jan 13, 2025 · 4 comments
Labels
bug Something isn't working dependencies Related to project dependencies released

Comments

@lucaswiecki
Copy link

lucaswiecki commented Jan 13, 2025

Steps to reproduce

Link to rar with comic:
Mirror 1: 7 days
https://www.transfernow.net/dl/20250113eVjZ2SaP
Mirror 2: 21 days
http://www.fileconvoy.com/dfl.php?id=g30cfa3d19081f7271000576501115e9b5389083d08

Add these comics to your library and scan. Komga will crash. Obviously, the file is not readable. Instead of having JPGs, it contains other CBZ files, but crushing whole komga service is not expected.

Expected behavior

In media management/analysis, there should be some information about error in the file.

Actual behavior

The Docker container running Komga crashes completely unless a specific file is removed from the folder.

Logs

docker_log.log
komga.log

Komga version

1.17.0

Operating system

linux/docker/unriad

Installation method

Docker

Other details

Checked rar with virus total:
https://www.virustotal.com/gui/file/8f067cf33b8e67277d1d57bb26785d7e046324d243394c46af1b00b0a7f5ce52

Acknowledgements

  • I have searched the existing issues (open AND closed) and this is a new ticket, NOT a duplicate or related to another open issue.
  • I have written a short but informative title.
  • I have checked the FAQ.
  • I have updated the app to the latest version.
  • I will fill out all of the requested information in this form.
@gotson gotson added bug Something isn't working dependencies Related to project dependencies and removed triage labels Jan 14, 2025
@gotson
Copy link
Owner

gotson commented Jan 15, 2025

Thanks for the report. The issue is in the NightCompress library, but may also be in libarchive which is used by NightCompress.

I tested with bsdtar and instead of listing the 3 zips, it lists the content of the first zip inside the rar:

> bsdtar tvf Armia\ Ciemnosci\ \(tom\ 1-3\).rar
drwxrwxr-x  0 0      0           0 Mar  8  2009 Armia Ciemno\230ci #01 TRANSL.POLiSH.Comic.eBook-GruMiK/
-rw-rw-r--  0 0      0        5970 Apr 17  2007 Armia Ciemno\230ci #01 TRANSL.POLiSH.Comic.eBook-GruMiK/#087 Armia Ciemno\230ci #01.txt
-rw-rw-r--  0 0      0     1034961 Apr 19  2007 Armia Ciemno\230ci #01 TRANSL.POLiSH.Comic.eBook-GruMiK/2007.04.19.jpg
-rw-rw-r--  0 0      0      883107 Apr  8  2007 Armia Ciemno\230ci #01 TRANSL.POLiSH.Comic.eBook-GruMiK/Armia Ciemno\230ci #01pl 00.jpg
-rw-rw-r--  0 0      0      843166 Apr 10  2007 Armia Ciemno\230ci #01 TRANSL.POLiSH.Comic.eBook-GruMiK/Armia Ciemno\230ci #01pl 01.jpg
-rw-rw-r--  0 0      0      772769 Apr 10  2007 Armia Ciemno\230ci #01 TRANSL.POLiSH.Comic.eBook-GruMiK/Armia Ciemno\230ci #01pl 02.jpg
-rw-rw-r--  0 0      0      932451 Apr 10  2007 Armia Ciemno\230ci #01 TRANSL.POLiSH.Comic.eBook-GruMiK/Armia Ciemno\230ci #01pl 03.jpg
-rw-rw-r--  0 0      0      880917 Apr 10  2007 Armia Ciemno\230ci #01 TRANSL.POLiSH.Comic.eBook-GruMiK/Armia Ciemno\230ci #01pl 04.jpg
-rw-rw-r--  0 0      0      909363 Apr  8  2007 Armia Ciemno\230ci #01 TRANSL.POLiSH.Comic.eBook-GruMiK/Armia Ciemno\230ci #01pl 05.jpg
-rw-rw-r--  0 0      0      876508 Apr 10  2007 Armia Ciemno\230ci #01 TRANSL.POLiSH.Comic.eBook-GruMiK/Armia Ciemno\230ci #01pl 06.jpg
-rw-rw-r--  0 0      0      927831 Apr 10  2007 Armia Ciemno\230ci #01 TRANSL.POLiSH.Comic.eBook-GruMiK/Armia Ciemno\230ci #01pl 07.jpg
-rw-rw-r--  0 0      0      865938 Apr 10  2007 Armia Ciemno\230ci #01 TRANSL.POLiSH.Comic.eBook-GruMiK/Armia Ciemno\230ci #01pl 08.jpg
-rw-rw-r--  0 0      0      927202 Apr 10  2007 Armia Ciemno\230ci #01 TRANSL.POLiSH.Comic.eBook-GruMiK/Armia Ciemno\230ci #01pl 09.jpg
-rw-rw-r--  0 0      0      874272 Apr 10  2007 Armia Ciemno\230ci #01 TRANSL.POLiSH.Comic.eBook-GruMiK/Armia Ciemno\230ci #01pl 10.jpg
-rw-rw-r--  0 0      0      881926 Apr 10  2007 Armia Ciemno\230ci #01 TRANSL.POLiSH.Comic.eBook-GruMiK/Armia Ciemno\230ci #01pl 11.jpg
-rw-rw-r--  0 0      0     1094449 Apr 10  2007 Armia Ciemno\230ci #01 TRANSL.POLiSH.Comic.eBook-GruMiK/Armia Ciemno\230ci #01pl 12.jpg
-rw-rw-r--  0 0      0      836461 Apr 10  2007 Armia Ciemno\230ci #01 TRANSL.POLiSH.Comic.eBook-GruMiK/Armia Ciemno\230ci #01pl 13.jpg
-rw-rw-r--  0 0      0      911814 Apr 10  2007 Armia Ciemno\230ci #01 TRANSL.POLiSH.Comic.eBook-GruMiK/Armia Ciemno\230ci #01pl 14.jpg
-rw-rw-r--  0 0      0     1063177 Apr 10  2007 Armia Ciemno\230ci #01 TRANSL.POLiSH.Comic.eBook-GruMiK/Armia Ciemno\230ci #01pl 15.jpg
-rw-rw-r--  0 0      0     1108437 Apr 10  2007 Armia Ciemno\230ci #01 TRANSL.POLiSH.Comic.eBook-GruMiK/Armia Ciemno\230ci #01pl 16.jpg
-rw-rw-r--  0 0      0     1140613 Apr 10  2007 Armia Ciemno\230ci #01 TRANSL.POLiSH.Comic.eBook-GruMiK/Armia Ciemno\230ci #01pl 17.jpg
-rw-rw-r--  0 0      0      981413 Apr 10  2007 Armia Ciemno\230ci #01 TRANSL.POLiSH.Comic.eBook-GruMiK/Armia Ciemno\230ci #01pl 18.jpg
-rw-rw-r--  0 0      0      987660 Apr 10  2007 Armia Ciemno\230ci #01 TRANSL.POLiSH.Comic.eBook-GruMiK/Armia Ciemno\230ci #01pl 19.jpg
-rw-rw-r--  0 0      0      961532 Apr 10  2007 Armia Ciemno\230ci #01 TRANSL.POLiSH.Comic.eBook-GruMiK/Armia Ciemno\230ci #01pl 20.jpg
-rw-rw-r--  0 0      0      959723 Apr 10  2007 Armia Ciemno\230ci #01 TRANSL.POLiSH.Comic.eBook-GruMiK/Armia Ciemno\230ci #01pl 21.jpg
-rw-rw-r--  0 0      0      974100 Apr 10  2007 Armia Ciemno\230ci #01 TRANSL.POLiSH.Comic.eBook-GruMiK/Armia Ciemno\230ci #01pl 22.jpg
-rw-rw-r--  0 0      0      924686 Apr 10  2007 Armia Ciemno\230ci #01 TRANSL.POLiSH.Comic.eBook-GruMiK/Armia Ciemno\230ci #01pl 23.jpg

@gotson
Copy link
Owner

gotson commented Jan 15, 2025

After some more investigation i found out that libarchive can be configured to only decode some formats. By setting it to decode RAR5 only, i managed to get the 3 zip entries instead of the content of the first zip.

I will need to release a new version of NightCompress and use that in Komga in order to fix your issue.

@gotson gotson closed this as completed in 3089063 Jan 15, 2025
Copy link
Contributor

🎉 This issue has been resolved in 1.18.0 (Release Notes)

@lucaswiecki
Copy link
Author

I can confirm that the issue has been resolved.

Thank you! I was able to identify the source of the problem, but it might pose a challenge for someone else.

P.S. Komga has the best UI design I've ever seen in a web application!

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 16, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working dependencies Related to project dependencies released
Projects
None yet
Development

No branches or pull requests

2 participants