]> Projects (at) Tadryanom (dot) Me - AdrOS.git/commit
security: Round 3 complete - parsers boot/storage validation
authorTulio A M Mendes <[email protected]>
Mon, 25 May 2026 18:15:35 +0000 (15:15 -0300)
committerTulio A M Mendes <[email protected]>
Wed, 3 Jun 2026 04:02:35 +0000 (01:02 -0300)
commitf5b402ca782c7ff546754dd534e79cb2106cf7e4
treeb6168cbd3c1ec631fc33d2dcfdf7a4b3e26bc109
parentc0f37ea653ffe64452b1ce38be33279797fdc02d
security: Round 3 complete - parsers boot/storage validation

- A15: Multiboot2 parser validation (arch_early_setup.c):
  - Validate total_size range (8-65536 bytes)
  - Validate tag size (minimum 8 bytes)
  - Validate tag doesn't exceed buffer
  - Use cursor-based iteration with 8-byte alignment for next tag

- F01: ext2 strict validation (ext2.c):
  - Validate rec_len >= 8 in all directory entry loops
  - Validate rec_len % 4 == 0 (4-byte alignment)
  - Validate rec_len doesn't exceed block boundary
  - Validate name_len < rec_len - 8
  - Applied to: ext2_finddir, ext2_readdir_impl, ext2_dir_add_entry, ext2_dir_remove_entry, ext2_dir_find_entry, ext2_dir_is_empty

Tests: 119/119 PASS (smoke test, SMP=4)
src/arch/x86/arch_early_setup.c
src/kernel/ext2.c