Skip to content

Commit 58f39e9

Browse files
committed
bugfix: applied nginx's official security fix for an issue in the range filter (CVE-2017-7529).
1 parent 391709c commit 58f39e9

File tree

3 files changed

+22
-1
lines changed

3 files changed

+22
-1
lines changed

patches/patch.2017.ranges.txt

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
diffsrc/http/modules/ngx_http_range_filter_module.c b/src/http/modules/ngx_http_range_filter_module.c
2+
--- src/http/modules/ngx_http_range_filter_module.c
3+
+++ src/http/modules/ngx_http_range_filter_module.c
4+
@@ -377,6 +377,10 @@ ngx_http_range_parse(ngx_http_request_t
5+
range->start = start;
6+
range->end = end;
7+
8+
+ if (size > NGX_MAX_OFF_T_VALUE - (end - start)) {
9+
+ return NGX_HTTP_RANGE_NOT_SATISFIABLE;
10+
+ }
11+
+
12+
size += end - start;
13+
14+
if (ranges-- == 0) {

util/mirror-tarballs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,13 @@ cd nginx-$ver || exit 1
3434

3535
# patch the patch
3636

37+
answer=`$root/util/ver-ge "$main_ver" 1.13.3`
38+
if [ "$answer" = "N" ]; then
39+
echo "$info_txt applying the patch for nginx security advisory (CVE-2017-7529)"
40+
patch -p0 < $root/patches/patch.2017.ranges.txt || exit 1
41+
echo
42+
fi
43+
3744
answer=`$root/util/ver-ge "$main_ver" 1.5.12`
3845
if [ "$answer" = "N" ]; then
3946
echo "$info_txt applying the patch for nginx security advisory (CVE-2014-0133)"

util/ver

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22

33
main_ver=1.11.2
4-
minor_ver=3
4+
minor_ver=4
55
version=$main_ver.$minor_ver
66
echo $version
77

0 commit comments

Comments
 (0)