From e1d19063b554744566305543768915b074917686 Mon Sep 17 00:00:00 2001 From: Sebastian Reimers Date: Sun, 19 Nov 2023 00:09:55 +0100 Subject: [PATCH 1/3] ci/freebsd: update vmactions/freebsd-vm@v1 (#1006) --- .github/workflows/freebsd.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/freebsd.yml b/.github/workflows/freebsd.yml index 8735a267c..09fbbef61 100644 --- a/.github/workflows/freebsd.yml +++ b/.github/workflows/freebsd.yml @@ -10,7 +10,7 @@ on: jobs: build: - runs-on: macos-12 + runs-on: ubuntu-22.04 timeout-minutes: 20 env: @@ -21,7 +21,7 @@ jobs: - name: Test in FreeBSD id: test - uses: vmactions/freebsd-vm@v0 + uses: vmactions/freebsd-vm@v1 with: usesh: true prepare: | From 7ce3a7708dc3a96fbf2ab765244012463687640a Mon Sep 17 00:00:00 2001 From: Sebastian Reimers Date: Sun, 19 Nov 2023 09:07:55 +0100 Subject: [PATCH 2/3] httpauth/digest: fix httpauth_digest_response_full err check Found by coverity --- src/httpauth/digest.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/httpauth/digest.c b/src/httpauth/digest.c index 5bd6c3a25..5a23514f0 100644 --- a/src/httpauth/digest.c +++ b/src/httpauth/digest.c @@ -961,6 +961,9 @@ int httpauth_digest_response_full(struct httpauth_digest_enc_resp **presp, goto out; } + if (err) + goto out; + err = digest_response(resp, chall, method, user, passwd, entitybody); out: From 80ea9184706cd726c36a9dc278ed7de3b058ab99 Mon Sep 17 00:00:00 2001 From: Sebastian Reimers Date: Sun, 19 Nov 2023 09:10:04 +0100 Subject: [PATCH 3/3] httpauth/digest: fix digest_response possible NULL deref found by coverity --- src/httpauth/digest.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/httpauth/digest.c b/src/httpauth/digest.c index 5a23514f0..2c3d04ccf 100644 --- a/src/httpauth/digest.c +++ b/src/httpauth/digest.c @@ -635,12 +635,13 @@ static int digest_response(struct httpauth_digest_enc_resp *resp, uint8_t *hash1 = NULL; uint8_t *hash2 = NULL; struct mbuf *mb = NULL; - size_t hashstringl = (resp->hash_length * 2) + 1; int err = 0, n = 0; if (!resp || !resp->hashh) return EINVAL; + size_t hashstringl = (resp->hash_length * 2) + 1; + mb = mbuf_alloc(str_len(user) + str_len(passwd) + chall->realm.l + 2); if (!mb) return ENOMEM;