[InterNetNews/inn] 954f7a: dbz: Fix NULL innconf deref with mmaped tables
Kevin Bowling
noreply at github.com
Wed May 27 18:31:20 UTC 2026
Branch: refs/heads/main
Home: https://github.com/InterNetNews/inn
Commit: 954f7a6738f47c469594f0c32ecdb039f9409081
https://github.com/InterNetNews/inn/commit/954f7a6738f47c469594f0c32ecdb039f9409081
Author: Kevin Bowling <kevin.bowling at kev009.com>
Date: 2026-05-27 (Wed, 27 May 2026)
Changed paths:
M lib/dbz.c
Log Message:
-----------
dbz: Fix NULL innconf deref with mmaped tables
dbz set() dereferenced innconf->nfswriter unconditionally when writing
to an INCORE_MMAP table, but innconf may be NULL (it defaults to NULL
and is only populated by innconf_read()). This segfaulted any caller
that opens history for writing without loading innconf first.
The crash surfaced under --enable-tagged-hash because hisv6 forces
pag_incore = INCORE_MMAP unconditionally in tagged-hash builds, whereas
non-tagged builds only use INCORE_MMAP when the HIS_MMAP flag is set.
The lib/bloom-hiswalk and expire/tombstone-hisexpire tests, which open
history for writing without setting up innconf, segfaulted only in
tagged-hash builds.
Guard the dereference with a NULL check, matching the idiom already used
in other libinn/storage code. nfswriter defaults to false, so a NULL
innconf correctly skips the NFS-writer msync optimization.
close #339
close #341
To unsubscribe from these emails, change your notification settings at https://github.com/InterNetNews/inn/settings/notifications
More information about the inn-committers
mailing list