<b>6.0.0.2411</b>
sunliqiang 2026.10.25 08:14:52
Validate irt_backslot against the index slot count
A slot left in the irt_migrate state by ALTER INDEX ... SET TABLESPACE
stores the number of the slot holding the original index in
irt_backslot.  getIndexSlot() and the irt_migrate branch of
modifyIrtRepeat() turned that field into &irt_rpt[backId] with only an
fb_assert guarding the range, so a corrupted index root page moved both
the reads in getIndexSlot() and the setKill() write in
modifyIrtRepeat() up to 65535 * 24 bytes past the page buffer.
Add index_root_page::getBackSlot() returning NULL when the stored slot
points outside the page and raise BUGCHECK(204) in both call sites
instead of using the bad pointer.  Checked with a database whose index
root page carries a migrated slot with irt_backslot = 0xFFFF: CREATE
INDEX used to corrupt engine memory, now it stops with the index
inconsistency error while normal DDL and DML are unaffected.  Unit
tests for the slot range check run as part of libEngine14_test.

Changed paths:
  M src/jrd/btr.cpp
  M src/jrd/ods.h
  M src/jrd/tests/IndexRootPageTest.cpp