aviralgarg05 opened a new pull request, #3718:
URL: https://github.com/apache/nuttx-apps/pull/3718

   *Note: Please adhere to [Contributing 
Guidelines](https://github.com/apache/nuttx/blob/master/CONTRIBUTING.md).*
   
   Depends-On: apache/nuttx-apps/pull/3642
   
   ## Summary
   
   A manifest read from a catalog, and an entry read from the installed
   database, were used as they arrived. A name or a version containing a path
   separator therefore reached the filesystem, and a database could name a
   current version that it did not list among the installed ones.
   
   This checks those fields are usable as a single path component, that the
   current and previous versions appear in the recorded version list, and
   applies a size limit to each field.
   
   Version comparison also had two problems: it could overflow on a long
   numeric prefix, and it treated versions sharing that prefix as equal, so 1a
   and 1b compared the same. It now compares the numeric part without
   overflowing and falls back to the remainder.
   
   The manifest gains an optional icon, and the manifest actually recorded for
   an installed version can now be read back, which matters after a rollback
   has left the installed version behind the catalog.
   
   This is the second of four parts of #3642, which was one commit covering
   several unrelated changes.
   
   ## Impact
   
   - New feature: NO, this is validation and correctness on existing paths.
   - User adaptation: NO.
   - Build: NO.
   - Hardware: NO.
   - Documentation: NO.
   - Security: YES. A catalog or database that has been tampered with can no
     longer smuggle a path traversal through a name or version field.
   - Compatibility: A manifest whose fields were already valid parses as
     before. One that was not is now rejected instead of being acted on.
   
   ## Testing
   
   Build host: macOS 26.5, arm64, `xtensa-esp-elf-gcc 14.2.0`
   (`esp-14.2.0_20251107`).
   
   Target: Xtensa / ESP32-S3, Waveshare ESP32-S3-Touch-LCD-7.
   
   - `nxstyle`, `tools/checkpatch.sh`, `codespell` and `git diff --check` on
     every changed file
   - all `system/nxpkg` sources compiled for the target with this commit
     applied on top of #3642
   
   This commit does not build on `master` alone because it uses declarations
   added by #3642; the `Depends-On` line above lets CI apply that first.
   
   ## PR verification Self-Check
   
   - [x] This PR introduces one focused change.
   - [x] I have updated all required description fields above.
   - [x] I have reviewed and signed every commit.
   - [x] This PR adheres to the current contribution and coding guidelines.
   - [ ] My PR is still work in progress.
   - [x] My PR is ready for review and can be safely merged.
   


-- 
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]

Reply via email to