Summary: | Improper assert in prune_cache triggers if clock jumps backwards | ||
---|---|---|---|
Product: | glibc | Reporter: | Florian Weimer <fweimer> |
Component: | nscd | Assignee: | Florian Weimer <fweimer> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | drepper.fsp, fweimer |
Priority: | P2 | Flags: | fweimer:
security-
|
Version: | unspecified | ||
Target Milestone: | 2.39 | ||
See Also: | https://issues.redhat.com/browse/RHEL-1192 | ||
Host: | Target: | ||
Build: | Last reconfirmed: |
Description
Florian Weimer
2023-08-28 06:12:50 UTC
Patch posted: [PATCH] nscd: Skip unusable entries in first pass in prune_cache (bug 30800) <https://inbox.sourceware.org/libc-alpha/87o7iry6k6.fsf@oldenburg.str.redhat.com/T/#u> Fixed for 2.39 via: commit c00b984fcd53f679ca2dafcd1aee2c89836e6e73 Author: Florian Weimer <fweimer@redhat.com> Date: Tue Aug 29 08:28:31 2023 +0200 nscd: Skip unusable entries in first pass in prune_cache (bug 30800) Previously, if an entry was marked unusable for any reason, but had not timed out yet, the assert would trigger. One way to get into such state is if a data change is detected during re-validation of an entry. This causes the entry to be marked as not usable. If exits nscd soon after that, then the clock jumps backwards, and nscd restarted, the cache re-validation run after startup triggers the removed assert. The change is more complicated than just the removal of the assert because entries marked as not usable should be garbage-collected in the second pass. To make this happen, it is necessary to update some book-keeping data. Reviewed-by: DJ Delorie <dj@redhat.com> |