Compare commits

...

2 Commits

Author SHA1 Message Date
Vladimir Dubrovin
5aa3886eb8 tlspr: a ServerHello too short for the extensions length refused (#1286)
Some checks failed
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Has been cancelled
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-latest) (push) Has been cancelled
C/C++ CI MacOS / ${{ matrix.target }} (macos-15) (push) Has been cancelled
C/C++ CI Windows / ${{ matrix.target }} (windows-2022) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (macos-15) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-latest) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (windows-2022) (push) Has been cancelled
C/C++ CI cmake / ubuntu-latest (wolfSSL) (push) Has been cancelled
2026-11-10 15:20:13 +03:00
Vladimir Dubrovin
15012177aa pcre: a rule with no ACL a match data of its own, not itself
A rule whose ACL was missing was handed to the filters as the
connection's data, which they read as a match data block and freed:
a pointer into the configuration, dereferenced as another type and
given back to malloc. A rule without an ACL now skips the check and
goes on with a block of its own, and nothing a filter is given is
ever the rule itself.

(cherry picked from commit a7e5a8b48b)
2026-11-08 14:42:34 +03:00
2 changed files with 8 additions and 6 deletions

View File

@ -264,13 +264,14 @@ static FILTER_ACTION pcre_filter_client(void *fo, struct clientparam * param, vo
struct pcre_filter_data *rule = (struct pcre_filter_data *)fo;
struct pcre_client_data *pcd;
*fc = fo;
*fc = NULL;
if(!fo) return PASS;
if(!rule->acl) return CONTINUE;
if(rule->acl){
memset (&tmpace, 0, sizeof(struct ace));
tmpace.src = rule->acl->src;
res = pl->ACLMatches(&tmpace, param);
if(!res) return PASS;
}
/* the connection goes on with a match data of its own */
if(!(pcd = pl->mallocfunc(sizeof(struct pcre_client_data)))){
*fc = NULL;

View File

@ -224,6 +224,7 @@ int parsehello(int type, unsigned char *hello, unsigned len, char *sni, int * sn
else if(type == 2){
offset += 3;
}
if((offset + 2) > len) return -6;
elen = size16(hello+offset);
offset += 2;
if(elen+offset != len) return -9;