Zephyr ZMS орнатуды қалпына келтірудегі жалған кілт-мән жазбалары
Zephyr
Қысқаша
Zephyr Memory Storage (ZMS) кілт-мән қоймасындағы осалдық төмен артықшылықтары бар қашықтағы шабуылдаушыға сақталған мәнге (мысалы, Bluetooth арқылы жазылатын құрылғы атауы немесе желіден алынған конфигурация) шамамен 16 байт таңдалған мазмұнды орналастыру арқылы жалған бөлу кестесі жазбаларын енгізуге мүмкіндік береді. Жалған жазбалар келесі монтаждаудан кейін күшіне енеді, егер зардап шеккен сектордағы ең жаңа жазба шағын немесе жою болса. Жалған жазба ZMS кез келген таңдалған кілт үшін қайтаратын мәнді қайта анықтап, басқа сақталған параметрлер мәндерін бүлдіруі мүмкін, әсері белсенді флэш-сектормен шектеледі.
Түйіндемені дереккөздер негізінде ЖИ жасаған және ол автоматты түрде аударылған.
Түзету
Түзетілген нұсқалар: 4.3.24.5.0
Зардап шегетін нұсқалар
| zephyr | бастап 4.0.0 → түзетілді 4.3.2 бастап 4.4.0 → түзетілді 4.5.0 |
Түпнұсқа сипаттама (EN)
Түпнұсқа тақырып: Zephyr forged key-value entries in ZMS mount recovery
The mount-time recovery scan of the Zephyr Memory Storage (ZMS) key-value store, zms_recover_last_ate() in subsys/kvss/zms/zms.c (subsys/fs/zms/zms.c in older releases), computes the end of the sector's data area incorrectly. Every valid allocation table entry (ATE) reset the data-end bound to the start of the sector, including entries whose value is stored inline (8 bytes or less) and delete entries. When the newest ATE in the active sector is one of these, the scan continues past the ATE area into the payload area and reads stored value bytes as struct zms_ate records. Any payload slot that passes the ATE check (a CRC8 plus the one-byte sector cycle count) is adopted as the newest entry. zms_init() then sets fs->ate_wra and fs->data_wra from it. The pointers are only this weak check away from data an application may have stored on behalf of a remote party: a BLE-writable device name, provisioned credentials, or configuration received over the network. An attacker who can get about 16 bytes of chosen content persisted in a ZMS value can plant a forged ATE. The forged entry takes effect after the next mount, provided the newest entry in that sector is small or a delete. Random data can also match by chance, which is how the issue was found. A forged or accidentally matched ATE overrides the stored entry for any chosen id. Its inline data or its offset/len pointer controls what later reads of that key return. The misplaced write pointers also make later writes place ATEs and payloads over other entries' existing data, silently corrupting persistent configuration such as settings values stored in ZMS. The effects are limited to the active flash sector and to what ZMS returns to its callers. No RAM out-of-bounds access was identified.