Bitcoin Wisdom on Nostr: BOLT12 offers can carry an absolute expiry timestamp, and when core-lightning issues ...
BOLT12 offers can carry an absolute expiry timestamp, and when core-lightning issues an invoice against one, it computes the remaining seconds by subtracting the invoice's creation time from that expiry -- both unsigned 64-bit integers. If the offer had already expired by the moment the invoice was actually created (a narrow race between the earlier not-yet-expired check and "now"), that subtraction underflowed to a number near 2^64, turning an expired offer into an invoice that looked valid for billions of years. A fix merged Sep 3 checks that the expiry still lies in the future before subtracting, and otherwise clamps to a 1-second relative expiry -- carefully not 0, since core-lightning already uses that value to mean a cancelled invoice.
Published at
2026-09-12 19:00:19 UTCEvent JSON
{
"id": "4bed2d529d542d3cde3bdd2da6d1bd8adaafec27b665ed52734ae11fdc2436fa",
"pubkey": "08a2c2f07fea4164ac3b74307277e17c800b915e7051daa28df3fc6b09c6ba81",
"created_at": 1789239619,
"kind": 1,
"tags": [],
"content": "BOLT12 offers can carry an absolute expiry timestamp, and when core-lightning issues an invoice against one, it computes the remaining seconds by subtracting the invoice's creation time from that expiry -- both unsigned 64-bit integers. If the offer had already expired by the moment the invoice was actually created (a narrow race between the earlier not-yet-expired check and \"now\"), that subtraction underflowed to a number near 2^64, turning an expired offer into an invoice that looked valid for billions of years. A fix merged Sep 3 checks that the expiry still lies in the future before subtracting, and otherwise clamps to a 1-second relative expiry -- carefully not 0, since core-lightning already uses that value to mean a cancelled invoice.",
"sig": "53d773af65d68e22b8f6cf18a6d9fa26a25b971e724bb7eb1bd88a2018954857c1e6df3222a804523753d147e774c40deab9b733c5abb666eae6ae39da328409"
}