Skip to content

Signal registration crashes interlock (release 2017.03.07) #34

@bwegh

Description

@bwegh

the registration at Signal crashes INTERLOCK and even a restart does not help as it somehow seem to try to register again.

During the first registration a dialog with "request failed, invalid backend response" pops up.

the debug log is:

2017/05/23 05:17:38 api.go:49: 10.0.0.2:43878 POST /api/Signal/register
2017/05/23 05:17:38 json.go:33: {"contact":"+1234567890123","code":"xxx-yyy"}
2017/05/23 05:17:38 api.go:192: {"response":null,"status":"OK"}
2017/05/23 05:17:38 status.go:50: received Signal registration verification code for +1234567890123
DEBU[2017/05/23 05:17:38] PUT /v1/accounts/code/xxxyyy 204
DEBU[2017/05/23 05:17:39] PUT /v2/keys/ 204
                           
2017/05/23 05:17:39 status.go:50: registration complete for +1234567890123
2017/05/23 05:17:39 status.go:50: starting Signal message listener for +1234567890123
panic: runtime error: slice bounds out of range

goroutine 220 [running]:
github.com/janimo/textsecure.handleReceivedMessage(0x0, 0x0, 0x0, 0x555888, 0x10b45d80)
        /home/lcars/go/src/github.com/janimo/textsecure/textsecure.go:462 +0xa2c
github.com/janimo/textsecure.StartListening(0x590c70, 0x5)
        /home/lcars/go/src/github.com/janimo/textsecure/websocket.go:204 +0x1e0
main.(*Signal).start(0x108743c0)
        /home/lcars/lab/buildroot/output/build/interlock-043b84a7650ed4d78881eac7e0e5788e16ab531f/src/signal.go:544 +0x84
main.(*Signal).registrationDone(0x108743c0)
        /home/lcars/lab/buildroot/output/build/interlock-043b84a7650ed4d78881eac7e0e5788e16ab531f/src/signal.go:539 +0xac
main.(*Signal).(main.registrationDone)-fm()
        /home/lcars/lab/buildroot/output/build/interlock-043b84a7650ed4d78881eac7e0e5788e16ab531f/src/signal.go:481 +0x1c
github.com/janimo/textsecure.registerDevice(0x10a92c80, 0x10ac6740)
        /home/lcars/go/src/github.com/janimo/textsecure/textsecure.go:354 +0x124
github.com/janimo/textsecure.Setup(0x10a5fad0, 0x555a88, 0x10a80dd0)
        /home/lcars/go/src/github.com/janimo/textsecure/textsecure.go:303 +0x36c

and unmounting, closing the interlockfs and restarting interlock:

2017/05/23 05:27:32 session.go:66: new session for volume test
2017/05/23 05:27:32 api.go:192: {"response":{"XSRFToken":"base64-token","volume":"test"},"status":"OK"}
2017/05/23 05:27:32 status.go:50: starting Signal message listener for +1234567890123
2017/05/23 05:27:32 api.go:49: 10.0.0.2:43928 POST /api/config/time
2017/05/23 05:27:32 json.go:33: {"epoch":1495517252}
2017/05/23 05:27:32 cmd.go:42: executing system command, sudo: true, cmd: /bin/date, args: [-s @1495517252]
2017/05/23 05:27:32 api.go:49: 10.0.0.2:43928 GET /api/crypto/ciphers
2017/05/23 05:27:32 api.go:192: {"response":[{"name":"TOTP","info":"Time-Based One-Time Password Algorithm (RFC6238, a.k.a. Google Authenticator)","key_format":"base32","enc":false,"dec":false,"sig":false,"otp":true,"msg":false,"ext":"totp"},{"name":"Signal","info":"Signal (TextSecure) protocol V2","key_format":"binary","enc":false,"dec":false,"sig":false,"otp":false,"msg":true,"ext":"signal"},{"name":"OpenPGP","info":"OpenPGP (golang.org/x/crypto/openpgp)","key_format":"armor","enc":true,"dec":true,"sig":true,"otp":false,"msg":false,"ext":"pgp"},{"name":"AES-256-OFB","info":"AES OFB w/ 256 bit key derived using PBKDF2","key_format":"password","enc":true,"dec":true,"sig":false,"otp":false,"msg":false,"ext":"aes256ofb"}],"status":"OK"}
2017/05/23 05:27:32 api.go:49: 10.0.0.2:43928 POST /api/status/running
2017/05/23 05:27:32 api.go:192: {"response":{"freeram":492994560,"load_1":37184,"load_15":6272,"load_5":11712,"log":[{"epoch":1495517252,"code":5,"msg":"starting Signal message listener for +1234567890123"},{"epoch":1495517251,"code":5,"msg":"setting mount point permissions for user interlock"},{"epoch":1495517251,"code":5,"msg":"mounting encrypted volume to /home/interlock/.interlock-mnt"},{"epoch":1495517201,"code":5,"msg":"unlocking encrypted volume test"}],"notification":null,"uptime":1051},"status":"OK"}
2017/05/23 05:27:32 api.go:49: 10.0.0.2:43928 GET /api/status/version
2017/05/23 05:27:32 api.go:192: {"response":{"build":"interlock@inversepath on 2017-03-07 10:53:26 signal","key_path":"keys","revision":"043b84a"},"status":"OK"}
2017/05/23 05:27:32 api.go:49: 10.0.0.2:43928 POST /api/file/list
2017/05/23 05:27:32 json.go:33: {"path":"/.ssh"}
2017/05/23 05:27:32 api.go:192: {"response":{"free_space":12586774528,"inodes":[{"name":"authorized_keys","dir":false,"size":391,"mtime":1495516459,"key_path":false,"private":false,"key":null}],"total_space":21001486336},"status":"OK"}
2017/05/23 05:27:32 status.go:50: adjusted device time to 05:27:32
2017/05/23 05:27:32 api.go:192: {"response":null,"status":"OK"}
panic: runtime error: slice bounds out of range


goroutine 156 [running]:
github.com/janimo/textsecure.handleReceivedMessage(0x0, 0x0, 0x0, 0x555888, 0x10ab0b80)
        /home/lcars/go/src/github.com/janimo/textsecure/textsecure.go:462 +0xa2c
github.com/janimo/textsecure.StartListening(0x590c70, 0x5)
        /home/lcars/go/src/github.com/janimo/textsecure/websocket.go:204 +0x1e0
main.(*Signal).start(0x10872320)
        /home/lcars/lab/buildroot/output/build/interlock-043b84a7650ed4d78881eac7e0e5788e16ab531f/src/signal.go:544 +0x84
main.(*Signal).Activate.func1(0x10872320)
        /home/lcars/lab/buildroot/output/build/interlock-043b84a7650ed4d78881eac7e0e5788e16ab531f/src/signal.go:97 +0x1c
created by main.(*Signal).Activate
        /home/lcars/lab/buildroot/output/build/interlock-043b84a7650ed4d78881eac7e0e5788e16ab531f/src/signal.go:98 +0x70

to be able to use interlock again the /keys/signal directory has to be removed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions