mvdan / bitw

Minimalist BitWarden client
BSD 3-Clause "New" or "Revised" License
169 stars 15 forks source link

Segmentation fault when serving #46

Open apprehensions opened 7 months ago

apprehensions commented 7 months ago
Listening on org.freedesktop.secrets
Password: 
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x721f96]

goroutine 9 [running]:
main.(*Cipher).Match(0x0?, {0xc0003101f0, 0x8}, {0xc000310210, 0xa})
        /home/meow/.cache/go/mod/mvdan.cc/bitw@v0.0.0-20230408140414-b6162395999b/sync.go:246 +0x176
main.(*dbusService).SearchItems(0x3?, 0x46a213?)
        /home/meow/.cache/go/mod/mvdan.cc/bitw@v0.0.0-20230408140414-b6162395999b/dbus.go:121 +0x26c
reflect.Value.call({0x791020?, 0xc0002a8060?, 0x7f5c3aa68338?}, {0x7bdfa5, 0x4}, {0xc000303f98, 0x1, 0x0?})
        /usr/lib/go/src/reflect/value.go:596 +0xce7
reflect.Value.Call({0x791020?, 0xc0002a8060?, 0x1?}, {0xc000303f98?, 0xc000114090?, 0x0?})
        /usr/lib/go/src/reflect/value.go:380 +0xb9
github.com/godbus/dbus/v5.exportedMethod.Call({{0x791020?, 0xc0002a8060?, 0xc000027e70?}}, {0xc000027e80, 0x1, 0xc000120000?})
        /home/meow/.cache/go/mod/github.com/godbus/dbus/v5@v5.1.0/default_handler.go:128 +0x1b1
github.com/godbus/dbus/v5.(*Conn).handleCall(0xc000120000, 0xc000259b30)
        /home/meow/.cache/go/mod/github.com/godbus/dbus/v5@v5.1.0/export.go:193 +0x565
created by github.com/godbus/dbus/v5.(*Conn).inWorker in goroutine 34
        /home/meow/.cache/go/mod/github.com/godbus/dbus/v5@v5.1.0/conn.go:435 +0x276

If bitw is running as a daemon, it should never ask for the password from the terminal #4 or preferably a PIN #7

apprehensions commented 7 months ago

I do not understand why bitw was designed to run as a daemon, but then not have any method to unlock it..

leath-dub commented 7 months ago

I can reproduce this as well when making a query like: secret-tool lookup username <username>