Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 678028 - sys-fs/squashtools-4.3-r2(?) with sys-libs/musl - unsquashfs: segmentation fault in ? at ?
Summary: sys-fs/squashtools-4.3-r2(?) with sys-libs/musl - unsquashfs: segmentation fa...
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Overlays (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo LiveCD Package Maintainers
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2019-02-14 19:56 UTC by malinowski
Modified: 2019-10-21 16:23 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Squashfs-tools - fix for stack overflow (musl-fix-stackoverflow.patch,414 bytes, patch)
2019-02-14 19:56 UTC, malinowski
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description malinowski 2019-02-14 19:56:00 UTC
Created attachment 565412 [details, diff]
Squashfs-tools - fix for stack overflow

sys-fs/squashfs-tools segfaults on musl due to a stack overflow when using unsquashfs. Details here: https://sourceforge.net/p/squashfs/bugs/59/

Thanks to @vaeth for helping me find the cause, and @ncopa (Alpine Dev) for the patch! 

N.B. I'm currently not running musl so if someone could check this again that would be appreciated, hence no strace logs. I've attached the patch however. If memory serves correctly, this was caused when trying to unsquashfs something.
Comment 1 Jeroen Roovers gentoo-dev 2019-02-14 21:21:55 UTC
Assuming this is about unsquashfs.
Comment 2 Jeroen Roovers gentoo-dev 2019-02-14 21:22:53 UTC
Which version are you using?
Comment 3 malinowski 2019-02-14 23:31:50 UTC
(In reply to Jeroen Roovers from comment #2)
> Which version are you using?

Hi. If I had to recall, it was 4.3-r2 - I was using amd64 around June 2018.
Comment 4 Jeroen Roovers gentoo-dev 2019-02-16 10:37:27 UTC
If you can reproduce the problem with a later version we might have something to fix (or alternatively stabilise).
Comment 5 Michael 'veremitz' Everitt 2019-10-21 06:51:35 UTC
Looks like we need to file a PR at https://github.com/plougher/squashfs-tools . This is somewhat overdue a fix, and all downstreams (us included) will benefit!
Comment 6 Jeroen Roovers gentoo-dev 2019-10-21 07:39:40 UTC
(In reply to Michael 'veremitz' Everitt from comment #5)
> Looks like we need to file a PR at
> https://github.com/plougher/squashfs-tools . This is somewhat overdue a fix,
> and all downstreams (us included) will benefit!

https://github.com/plougher/squashfs-tools/commit/ba215d73e153a6f237088b4ecb88c702bb4d4183
Comment 7 Michael 'veremitz' Everitt 2019-10-21 13:45:35 UTC
(In reply to Jeroen Roovers from comment #6)
> (In reply to Michael 'veremitz' Everitt from comment #5)
> > Looks like we need to file a PR at
> > https://github.com/plougher/squashfs-tools . This is somewhat overdue a fix,
> > and all downstreams (us included) will benefit!
> 
> https://github.com/plougher/squashfs-tools/commit/
> ba215d73e153a6f237088b4ecb88c702bb4d4183

WFM, well spotted ! :]
Comment 8 Jeroen Roovers gentoo-dev 2019-10-21 16:22:03 UTC
(In reply to Michael 'veremitz' Everitt from comment #7)
> (In reply to Jeroen Roovers from comment #6)
> > (In reply to Michael 'veremitz' Everitt from comment #5)
> > > Looks like we need to file a PR at
> > > https://github.com/plougher/squashfs-tools . This is somewhat overdue a fix,
> > > and all downstreams (us included) will benefit!
> > 
> > https://github.com/plougher/squashfs-tools/commit/
> > ba215d73e153a6f237088b4ecb88c702bb4d4183
> 
> WFM, well spotted ! :]

It works for everyone so long as no one uses the unsquashfs code to create a library.
Comment 9 Jeroen Roovers gentoo-dev 2019-10-21 16:23:02 UTC
Anyway, please try 4.4 and report back here.