Hi Yilin,

Thanks, I can reproduce it on v3. The BRIN tuple says its data starts
at byte 31, but the tuple is only 5 bytes long.

v4 checks that the data offset, the null bitmap and each stored value
fit inside the tuple before decoding it. It does not check what the
values contain. gist_page_items() had the same problem, so it gets the
same check. 0001 also fixes an overread of a btree posting list. All
come with tests, and I added you as Reported-by.

Thanks,
Shihao

Attachment: v4-0002-pageinspect-validate-page-headers-and-BRIN-GIN-an.patch
Description: Binary data

Attachment: v4-0001-pageinspect-validate-line-pointers-before-using-t.patch
Description: Binary data

Reply via email to