xeals / signal-back

Decrypt Signal encrypted backups outside the app
Apache License 2.0
700 stars 66 forks source link

error: makeslice: len out of range when running against large .backup file #19

Open nickfreemandesign opened 6 years ago

nickfreemandesign commented 6 years ago

Hello,

I'm experiencing an issue where executing the Darwin build against a 913MB .backup file throws:

panic: runtime error: makeslice: len out of range

heres the rest of the gooblyglob:

goroutine 1 [running]:
github.com/xeals/signal-back/types.(*BackupFile).Frame(0x106ea080, 0x1730a540, 0x0, 0x0)
    /home/travis/gopath/src/github.com/xeals/signal-back/types/backup.go:94 +0xc4
github.com/xeals/signal-back/cmd.XML(0x106ea080, 0x1a0960, 0x1061c0e0, 0x3, 0x3)
    /home/travis/gopath/src/github.com/xeals/signal-back/cmd/format.go:141 +0xb0
github.com/xeals/signal-back/cmd.glob..func3(0x10692370, 0x0, 0x0)
    /home/travis/gopath/src/github.com/xeals/signal-back/cmd/format.go:66 +0x205
github.com/xeals/signal-back/vendor/github.com/urfave/cli.HandleAction(0x150840, 0x1889f8, 0x10692370, 0x1061ed00, 0x0)
    /home/travis/gopath/src/github.com/xeals/signal-back/vendor/github.com/urfave/cli/app.go:490 +0x9c
github.com/xeals/signal-back/vendor/github.com/urfave/cli.Command.Run(0x17cfb1, 0x6, 0x0, 0x0, 0x0, 0x0, 0x0, 0x182f53, 0x1f, 0x187e07, ...)
    /home/travis/gopath/src/github.com/xeals/signal-back/vendor/github.com/urfave/cli/command.go:210 +0x8db
github.com/xeals/signal-back/vendor/github.com/urfave/cli.(*App).Run(0x10610b60, 0x1061e060, 0x5, 0x6, 0x0, 0x0)
    /home/travis/gopath/src/github.com/xeals/signal-back/vendor/github.com/urfave/cli/app.go:255 +0x585
main.main()
    /home/travis/gopath/src/github.com/xeals/signal-back/main.go:51 +0x1f7

Steps to reproduce:

  1. get your Signal-xx.backup, and signal-back_darwin_386 all in the same directory
  2. do the thing where you chmod and give executable permission to the darwin file
  3. execute ./signal-back_darwin_386 format -f xml > backup.xml signal-2018-06-23-11-41-13.backup
  4. enter the pw you got from signal
  5. wait for the error

version used: signal-back v0.1.5-dirty proto commit: d6610f0

I'm assuming this is because the backup file is just huge (not sure why its so big esp when my plaintext exports werent nearly as big), but if not what else do you think would cause the error?

Thanks, Nick

xeals commented 6 years ago

Turns out I was half-asleep when I wrote the example instructions. I'm surprised it even ran with what I gave.

Run ./signal-back_darwin_386 format -f xml signal-2018-06-23-11-41-13.backup > backup.xml instead (swapping the order of backup file and > backup.xml.

If you still get an error, try using the alpha build I've released and tack on -v after format: ./signal-back_darwin_386 format -v -f xml ... and throw whatever it spits out into a gist or similar.

nickfreemandesign commented 6 years ago

i see what you did there. ran it and got:

...
2018/06/23 22:49:32 MMS export not yet supported
2018/06/23 22:49:32 MMS export not yet supported
2018/06/23 22:49:32 MMS export not yet supported
2018/06/23 22:49:32 MMS export not yet supported
2018/06/23 22:49:32 MMS export not yet supported
Panicked: runtime error: makeslice: len out of range
[frame: starting at 912989417, size 3570549833]
xeals commented 6 years ago

Can you restore the backup using the actual Signal app? From what I can tell it's expecting some component to be ~3.5GB, which is obviously impossible given the size of your file. It's also too big for a 32-bit architecture to create, hence the error.

nickfreemandesign commented 6 years ago

interesting. yes, i was able to restore the backup via signal app on android. what i did was first trim all messages to have a history of 1 message (there was no 'delete everything' option as far as i could tell), then i ran the backup which brought my message history back (after undoing the message trim option).

because of the urgency to get back to the way things were, i resolved this problem by uninstalling signal and installing a port from @johanw666 's https://github.com/johanw666/Signal-Android/releases

until theres a way for me to access my backup with the current release, ill be stuck back in time, in the good old days of 'import/export'

thanks @xeals for your help and let me know if i can help on this debug process further.

EvanK commented 5 years ago

I am was getting this same crash and error, on a ~30.5MB backup file.

Update: I installed go and dep, build the latest commit locally, and that seemed to work...so thanks and nevermind?

ghost commented 5 years ago

I get the error even with small backup files containing only a handful of messages.

ma 26. marrask. 2018 klo 23.08 Evan Kaufman (notifications@github.com) kirjoitti:

I am getting this same crash and error, on a ~30.5MB backup file

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/xeals/signal-back/issues/19#issuecomment-441798127, or mute the thread https://github.com/notifications/unsubscribe-auth/AhY05nYPydP19xJq4OUcUXFxPAqu6yrnks5uzFgQgaJpZM4U0-jW .

ghost commented 5 years ago

This seems to work now. I had a file on which a previous version of signal-back gave this error, but it was processed successfully with the latest version. Thanks, and happy Christmas!

kaihsutai, 2018-12-20T10:16:47-0800:

I get the error even with small backup files containing only a handful of messages.

ma 26. marrask. 2018 klo 23.08 Evan Kaufman (notifications@github.com) kirjoitti:

I am getting this same crash and error, on a ~30.5MB backup file

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/xeals/signal-back/issues/19#issuecomment-441798127, or mute the thread https://github.com/notifications/unsubscribe-auth/AhY05nYPydP19xJq4OUcUXFxPAqu6yrnks5uzFgQgaJpZM4U0-jW .

-- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/xeals/signal-back/issues/19#issuecomment-449088989

3Ryan3 commented 1 year ago

any updates here? I have the same issue on winows with the signal-back_windows_386 file. tried xml and csv and both are empty. Backup file is 350MB