xhh233 opened a new issue, #22314: URL: https://github.com/apache/nuttx/issues/22314
**Mechanism.** In `mtd_config.c`, when the data write of a new entry fails partway, the rollback only rewrites the active marker. The partially written entry therefore remains readable after the failure. **Effect.** A failed store can leave a readable partial entry, so a later read returns truncated data instead of an error. **Location.** `drivers/mtd/mtd_config.c:1367` (master `f284e6d7`). **Trigger.** MTD data write returns an error after the entry header was already written. **Expected.** A failed data write leaves no readable entry. **Evidence.** Deterministic MTD fault shim (models the driver logic; the NuttX driver itself was not executed): injected write fault, error returned, readback still shows the entry. **Patch.** Invalidate or clear the entry when the data write fails. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
