Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V6 backports #1986

Open
wants to merge 3 commits into
base: v6
Choose a base branch
from
Open

V6 backports #1986

wants to merge 3 commits into from

Conversation

kinkie
Copy link
Contributor

@kinkie kinkie commented Jan 20, 2025

Backporting:

commit 8b31858 : Portability: remove explicit check for libdl
commit dd3292c : Refactor peerRefreshDNS() to clarify its (void*)1 logic
commit 0ef767a: Nil request dereference in ACLExtUser and SourceDomainCheck ACLs

kinkie and others added 3 commits January 20, 2025 08:43
OpenBSD does not have libdl, as it has dlopen() in libc.
It is not really needed, and force-requiring the presence of libdl
causes ./configure to fail on openbsd:

    checking for dlopen in -ldl... no
    configure: error: Required library 'dl' not found
…1950)

Creating a raw pointer with 1 as an address/value raised red flags, and
it was difficult to interpret tricky peerRefreshDNS() logic correctly.
…id-cache#1931)

ACLExtUser-based ACLs (i.e. ext_user and ext_user_regex) dereferenced a
nil request pointer when they were used in a context without a request
(e.g., when honoring on_unsupported_protocol).

SourceDomainCheck-based ACLs (i.e. srcdomain and srcdom_regex) have a
similar bug, although we do not know whether broken slow ACL code is
reachable without a request (e.g., on_unsupported_protocol tests cannot
reach that code until that directive starts supporting slow ACLs). This
change does not start to require request presence for these two ACLs to
avoid breaking any existing configurations that "work" without one.
@squid-anubis squid-anubis added the M-failed-description https://github.com/measurement-factory/anubis#pull-request-labels label Jan 20, 2025
else
debugs(28, 3, "no request to recordLookup()");

checklist->resumeNonBlockingCheck();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR incorrectly attributes this resumeNonBLockingCheck() change to PR 1931. That PR (i.e. master/v7 commit 0ef767a) does not change resumeNonBLockingCheck() calls. To backport that commit (without also backporting much more invasive commit 5fb6afe changes), this line/call has to be preserved AFAICT:

Suggested change
checklist->resumeNonBlockingCheck();
checklist->resumeNonBlockingCheck(SourceDomainLookup::Instance());

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
M-failed-description https://github.com/measurement-factory/anubis#pull-request-labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants