| From: | violin0613(at)tju(dot)edu(dot)cn <violin0613(at)tju(dot)edu(dot)cn> |
|---|---|
| To: | <pgsql-bugs(at)postgresql(dot)org> |
| Subject: | Fw: Re: heap_force_common in contrib/pg_surgery/heap_surgery.c has an off by one stack buffer overflow |
| Date: | 2026-06-03 16:22:53 |
| Message-ID: | 20260604002256.40f1fd544@smtp.qiye.163.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-bugs |
---Original---
From: "Noah Misch"<noah(at)leadboat(dot)com>
Date: Wed, Jun 3, 2026 23:25 PM
To: "王跃林"<violin0613(at)tju(dot)edu(dot)cn>;
Cc: "security"<security(at)postgresql(dot)org>;
Subject: Re: heap_force_common in contrib/pg_surgery/heap_surgery.c has an off by one stack buffer overflow
On Sat, May 23, 2026 at 11:56:59AM +0800, 王跃林 wrote:
> PoC
>
> CREATE EXTENSION IF NOT EXISTS pg_surgery
> â
> CREATE TABLE vuln_005_t()
> â
> INSERT INTO vuln_005_t SELECT FROM generate_series(1, 291)
> â
> SELECT heap_force_freeze('vuln_005_t'::regclass,
> ARRAY['(0, 291)']::tid[])
>
> The final statement triggers the bug.
>
> Results
>
> The debug build crashed with:
> TRAP: failed Assert("offno < MaxHeapTuplesPerPage"), File: "heap_surgery.c", Li
> ne: 231
> server closed the connection unexpectedly
>
> In a release build, the assertion is removed and the out of bounds
> write remains.
Thanks for the report. The function is superuser-only, so this is not a vuln.
Please report the overflow bug to pgsql-bugs(at)postgresql(dot)org(dot)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Alvaro Herrera | 2026-06-03 21:02:56 | Re: BUG #19500: pgrepack logical decoding plugin can crash assert builds via SQL decoding API |
| Previous Message | Srinath Reddy Sadipiralla | 2026-06-03 10:25:18 | Re: BUG #19500: pgrepack logical decoding plugin can crash assert builds via SQL decoding API |