ipwndfu icon indicating copy to clipboard operation
ipwndfu copied to clipboard

[Bug]: Too many decrypt-gid calls panics ROM

Open Cryptiiiic opened this issue 2 years ago • 2 comments

What device? (Specify CHIP/CPID)

8010

What happened?

Calling decrypt-gid n amount of times will eventually panic ROM

Version

next branch dev_install

What version of Python?

3.10

Relevant log output

❯ ipwndfu --decrypt-gid=22663e9874fb0aefbb55a606c4f0c0db912f24ef3322eab6275d0f214bbca60e4a13d6f0d232f179b32eea2f4dad2ac5
Decrypting with t8010si GID key.
Traceback (most recent call last):
  File "/Users/cryptic/.pyenv/versions/3.10.7/bin/ipwndfu", line 8, in <module>
    sys.exit(main())
  File "/Users/cryptic/.pyenv/versions/3.10.7/lib/python3.10/site-packages/ipwndfu/main.py", line 166, in main
    print(decrypt_gid(device, args.decrypt_gid, match=args.match_device))
  File "/Users/cryptic/.pyenv/versions/3.10.7/lib/python3.10/site-packages/ipwndfu/main.py", line 472, in decrypt_gid
    aes = pwned.aes(
  File "/Users/cryptic/.pyenv/versions/3.10.7/lib/python3.10/functools.py", line 926, in _method
    return method.__get__(obj, cls)(*args, **kwargs)
  File "/Users/cryptic/.pyenv/versions/3.10.7/lib/python3.10/site-packages/ipwndfu/usbexec.py", line 281, in _aes_bytes
    (retval, received) = self.execute(
  File "/Users/cryptic/.pyenv/versions/3.10.7/lib/python3.10/site-packages/ipwndfu/usbexec.py", line 364, in execute
    response = self.command(
  File "/Users/cryptic/.pyenv/versions/3.10.7/lib/python3.10/site-packages/ipwndfu/usbexec.py", line 332, in command
    device.ctrl_transfer(0xA1, 3, 0, 0, 6, 100)
  File "/Users/cryptic/.pyenv/versions/3.10.7/lib/python3.10/site-packages/usb/core.py", line 1082, in ctrl_transfer
    ret = self._ctx.backend.ctrl_transfer(
  File "/Users/cryptic/.pyenv/versions/3.10.7/lib/python3.10/site-packages/usb/backend/libusb1.py", line 893, in ctrl_transfer
    ret = _check(self.lib.libusb_control_transfer(
  File "/Users/cryptic/.pyenv/versions/3.10.7/lib/python3.10/site-packages/usb/backend/libusb1.py", line 604, in _check
    raise USBError(_strerror(ret), ret, _libusb_errno[ret])
usb.core.USBError: [Errno 5] Input/Output Error


### Sudo

- [X] I did run this as su or sudo

Cryptiiiic avatar Sep 15 '22 08:09 Cryptiiiic

Ya hoo! Thanks for the work item. It's been labeled with 'triage' and will be updated if someone wants to take it on.

github-actions[bot] avatar Sep 15 '22 09:09 github-actions[bot]

Stale issue message

github-actions[bot] avatar Nov 14 '22 21:11 github-actions[bot]