diff options
author | A. Wilcox <awilcox@wilcox-tech.com> | 2020-03-22 10:34:42 +0000 |
---|---|---|
committer | A. Wilcox <awilcox@wilcox-tech.com> | 2020-03-22 10:34:42 +0000 |
commit | 7a8eb9c1a4a9c2f3e3a3228266bcba74ab298c23 (patch) | |
tree | 7cb10f6bfae6c18be3f8b837840bdc060505fe65 /user/sox/CVE-2019-13590.patch | |
parent | 8e8bfad331752ef7dc605c9f7c65e8271f96ddeb (diff) | |
parent | 988d22dd710713d46c13c0b08f045aa2ce4f69d9 (diff) | |
download | packages-7a8eb9c1a4a9c2f3e3a3228266bcba74ab298c23.tar.gz packages-7a8eb9c1a4a9c2f3e3a3228266bcba74ab298c23.tar.bz2 packages-7a8eb9c1a4a9c2f3e3a3228266bcba74ab298c23.tar.xz packages-7a8eb9c1a4a9c2f3e3a3228266bcba74ab298c23.zip |
Merge branch 'cves.2020.03.16' into 'master'
CVE patches for 2020.03.16
See merge request adelie/packages!411
Diffstat (limited to 'user/sox/CVE-2019-13590.patch')
-rw-r--r-- | user/sox/CVE-2019-13590.patch | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/user/sox/CVE-2019-13590.patch b/user/sox/CVE-2019-13590.patch new file mode 100644 index 000000000..a09b11bae --- /dev/null +++ b/user/sox/CVE-2019-13590.patch @@ -0,0 +1,33 @@ +From 7b6a889217d62ed7e28188621403cc7542fd1f7e Mon Sep 17 00:00:00 2001 +From: Mans Rullgard <mans@mansr.com> +Date: Tue, 4 Feb 2020 12:55:18 +0000 +Subject: [PATCH] sox-fmt: validate comments_bytes before use (CVE-2019-13590) + [bug #325] + +Cap the comments size to 1 GB to avoid overflows in subsequent +arithmetic. + +The missing null check mentioned in the bug report is bogus since +lsx_calloc() returns a valid pointer or aborts. +--- + src/sox-fmt.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/src/sox-fmt.c b/src/sox-fmt.c +index aad965cd..11c88771 100644 +--- a/src/sox-fmt.c ++++ b/src/sox-fmt.c +@@ -46,7 +46,9 @@ static int startread(sox_format_t * ft) + lsx_readdw(ft, &comments_bytes)) + return SOX_EOF; + +- if (((headers_bytes + 4) & 7) || headers_bytes < FIXED_HDR + comments_bytes || ++ if (((headers_bytes + 4) & 7) || ++ comments_bytes > 0x40000000 || /* max 1 GB */ ++ headers_bytes < FIXED_HDR + comments_bytes || + (num_channels > 65535)) /* Reserve top 16 bits */ { + lsx_fail_errno(ft, SOX_EHDR, "invalid sox file format header"); + return SOX_EOF; +-- +2.25.0 + |