svn commit: r1935448 - in httpd/httpd/branches/2.4.x: . modules/md
[email protected] Wed, 17 Jun 2026 09:44:36 -0000
| Newsgroups | gmane.comp.apache.cvs |
|---|---|
| Message-ID | <178168947655.2690506.2339197205485508775@svn03-he-fi> |
Author: rjung
Date: Wed Jun 17 09:44:36 2026
New Revision: 1935448
Log:
mod_md: change types of fields of ocsp_summary_ctx_t
The number of members in ostat_by_id may be up to UINT_MAX
and there are no guarantees that all types of members (good,
revoked or unknown) are present. An integer overflow may also
occur in md_ocsp_get_summary() when they are summed as ints.
Change types of good, revoked and unknown to unsigned.
Found by Linux Verification Center (linuxtesting.org) with SVACE.
Submitted by: Anastasia Belova <nabelova31 gmail.com>
Github: closes #534
Backport of r1930710 from trunk, [mod_md CTR]
Modified:
httpd/httpd/branches/2.4.x/ (props changed)
httpd/httpd/branches/2.4.x/modules/md/md_ocsp.c
Modified: httpd/httpd/branches/2.4.x/modules/md/md_ocsp.c
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/md/md_ocsp.c Wed Jun 17 09:34:09 2026 (r1935447)
+++ httpd/httpd/branches/2.4.x/modules/md/md_ocsp.c Wed Jun 17 09:44:36 2026 (r1935448)
@@ -950,9 +950,9 @@ apr_status_t md_ocsp_remove_responses_ol
typedef struct {
apr_pool_t *p;
md_ocsp_reg_t *reg;
- int good;
- int revoked;
- int unknown;
+ unsigned good;
+ unsigned revoked;
+ unsigned unknown;
} ocsp_summary_ctx_t;
static int add_to_summary(void *baton, const void *key, apr_ssize_t klen, const void *val)