Skip to content

ZeroGod crashing after receiving IPP request #1234

@LavedenC1

Description

@LavedenC1

ZeroGod Crashes after IPP request

Description

I try to impersonate a printer with zerogod, and when I interact with the printer (like select it or discover it)

Environment

Info:

  • Bettercap version: bettercap v2.41.4 (built for linux amd64 with go1.25.1) (Installed with go install)
  • OS: Linux Debian 12 on amd64
  • Args: -iface wlo1
  • net.probe on zerogod.discovery on zerogod.advertise printer.yaml
  • Error output:
192.168.9.0/24 > 192.168.9.147  » panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x999584]

goroutine 1697 [running]:
io.ReadAtLeast({0x0, 0x0}, {0xc000a74028, 0x1, 0x1}, 0x1)
        /usr/local/go/src/io/io.go:335 +0x64
io.ReadFull(...)
        /usr/local/go/src/io/io.go:354
encoding/binary.Read({0x0, 0x0}, {0x37b2a60, 0x470bd60}, {0x136e460, 0xc001029340})
        /usr/local/go/src/encoding/binary/binary.go:262 +0xa5
github.com/phin1x/go-ipp.(*RequestDecoder).Decode(0xc001141f70, {0x0, 0x0})
        /home/xxx/go/pkg/mod/github.com/phin1x/go-ipp@v1.6.1/request.go:126 +0x72
github.com/bettercap/bettercap/v2/modules/zerogod.ippClientHandler(0xc0009b5200)
        /home/xxx/go/pkg/mod/github.com/bettercap/bettercap/v2@v2.41.4/modules/zerogod/zerogod_ipp_handler.go:57 +0x3ae
created by github.com/bettercap/bettercap/v2/modules/zerogod.(*Acceptor).startTCP.func1 in goroutine 536
        /home/xxx/go/pkg/mod/github.com/bettercap/bettercap/v2@v2.41.4/modules/zerogod/zerogod_acceptor.go:120 +0x553

Steps to Reproduce

1.Start bettercap
2. Start net.probe and zerogod.discovery
3. Load yaml config from file
4. Try to print from mobile
5. Error before you press print

Thank you

(also issue 1234!!!)

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions