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.
Assuming this is about unsquashfs.
Which version are you using?
(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.
If you can reproduce the problem with a later version we might have something to fix (or alternatively stabilise).
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!
(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
(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 ! :]
(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.
Anyway, please try 4.4 and report back here.