minidlna: Update to version 1.3.2

- Update from version 1.3.0 to 1.3.2
- Update of rootfile not required
- Patch for CVE-2022-26505 is now built into the source tarball
- Changelog
1.3.2 - Released 30-Aug-2022
	- Improved DNS rebinding attack protection.
	- Added Samsung Neo QLED series (2021) support.
	- Added webm/rm/rmvb support.
1.3.1 - Released 11-Feb-2022
	- Fixed a potential crash in SSDP request parsing.
	- Fixed a configure script failure on some platforms.
	- Protect against DNS rebinding attacks.
	- Fix an socket leakage issue on some platforms.
	- Minor bug fixes.

Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
Adolf Belka
2023-05-19 19:04:48 +02:00
committed by Michael Tremer
parent 736441bb39
commit aec620df45
2 changed files with 3 additions and 48 deletions

View File

@@ -1,44 +0,0 @@
--- minidlna-1.3.0/upnphttp.c.orig 2020-11-24 19:53:50.000000000 +0100
+++ minidlna-1.3.0/upnphttp.c 2022-04-30 12:59:23.432073807 +0200
@@ -273,6 +273,11 @@
p = colon + 1;
while(isspace(*p))
p++;
+ n = 0;
+ while(p[n] >= ' ')
+ n++;
+ h->req_Host = p;
+ h->req_HostLen = n;
for(n = 0; n < n_lan_addr; n++)
{
for(i = 0; lan_addr[n].str[i]; i++)
@@ -909,6 +914,18 @@
}
DPRINTF(E_DEBUG, L_HTTP, "HTTP REQUEST: %.*s\n", h->req_buflen, h->req_buf);
+ if(h->req_Host && h->req_HostLen > 0) {
+ const char *ptr = h->req_Host;
+ DPRINTF(E_MAXDEBUG, L_HTTP, "Host: %.*s\n", h->req_HostLen, h->req_Host);
+ for(i = 0; i < h->req_HostLen; i++) {
+ if(*ptr != ':' && *ptr != '.' && (*ptr > '9' || *ptr < '0')) {
+ DPRINTF(E_ERROR, L_HTTP, "DNS rebinding attack suspected (Host: %.*s)", h->req_HostLen, h->req_Host);
+ Send404(h);/* 403 */
+ return;
+ }
+ ptr++;
+ }
+ }
if(strcmp("POST", HttpCommand) == 0)
{
h->req_command = EPost;
--- minidlna-1.3.0/upnphttp.h.orig 2020-11-24 19:53:50.000000000 +0100
+++ minidlna-1.3.0/upnphttp.h 2022-04-30 13:00:22.619152312 +0200
@@ -89,6 +89,8 @@
struct client_cache_s * req_client;
const char * req_soapAction;
int req_soapActionLen;
+ const char * req_Host; /* Host: header */
+ int req_HostLen;
const char * req_Callback; /* For SUBSCRIBE */
int req_CallbackLen;
const char * req_NT;