Three bugs - Password character limit, for this device: installer sets device name incorrect, firmware version mismatch causes strange LED behavior.
- Dominant language
- Rust
- Stars
- 5.8k
- Forks
- 490
- Avg merge
- 3d 10h
- Merged PRs (30d)
- 23
Description
### Prerequisites
- [x] I have read [CONTRIBUTING.md](https://github.com/EFForg/rayhunter/blob/main/CONTRIBUTING.md)
### Bug Report Details
Device: T-Mobile TMOHS1
Firmware: TMOHS1_00.04.18 (tested firmware per docs: TMOHS1_00.05.20)
Rayhunter version: v0.10.2
Host OS: Ubuntu (Linux x64)
Installer binary: rayhunter-v0.10.2-linux-x64
### Issue 1: Installer panics with password longer than 16 characters
Running the installer with an admin password longer than 16 characters causes a panic in installer/src/wingtech.rs at the encrypt_password function.
**Reproduce:**
1. Set TMOHS1 admin pasword to any value longer than 16 characters via web UI.
2. Run installer.
3. Error 'main' panics at thread 'main' panicked at installer/src/wingtech.rs:45:6:
range end index 23 out of range for slice of length 16.
_Cause:_ AES128 block size
`let mut b = GenericArray::from([0u8; 16]);
b[..password.len()].copy_from_slice(password); // panics if password.len() > 16`
There is no check that password fits within the encryption block and the error gives no indication that password length is the cause.
### Issue 2: Installer sets `device = "orbic"` instead of `device = "tmobile"` on TMOHS1 with 04.18 firmware.
After successful installation on the TMOHS1, the config file at /data/rayhunter/config.toml contains device = "orbic" instead of device = "tmobile."
**Reproduce:** (on this device and firmware only):
1. Install rayhunter on TMOHS1.
2. Inspect the config via telnet: `cat /data/rayhunter/config.toml`
3. Find device name in the output.
_Cause:_ Installer config substitution relies on matching `#device = \"orbic\"`
Mostly causes LED issues, no blinking blue during recording, no warning.
Fix: `crate::CONFIG_TOML
.replace("device = \"orbic\"", "device = \"tmobile\"")`
### Issue 3: Further LED issues caused by firmware mismatch
On TMOHS1 firmware 0.04.18 which is notably older than the version with documented testing, even with device name issue fixed, the device prioritizes the signal for green LED to indicate connectivity. The rayhunter LED control is overridden, resulting in bleeding over the normal blue blinking signal.
On the older firmware, modem status writes green to `led:signal_green`, rayhunter writes to `led:signal_blue` or red. However, concurrent signals causes an oscillation between blue and green. Functionality is retained and the states of recording and warnings are still distinguishable.
Contributor guide
Assessment
This issue has not been assessed yet.