From 8b86c72ea2713e2a1d9c0f5af886e2250b05f46a Mon Sep 17 00:00:00 2001 From: "Yichun Zhang (agentzh)" Date: Wed, 20 Nov 2013 21:05:25 -0800 Subject: [PATCH] applied the official patch patch.2013.space.txt for the Nginx core to fix the security issue CVE-2013-4547. --- patches/patch.2013.space.txt | 18 ++++++++++++++++++ util/mirror-tarballs | 7 +++++++ util/ver | 2 +- 3 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 patches/patch.2013.space.txt diff --git a/patches/patch.2013.space.txt b/patches/patch.2013.space.txt new file mode 100644 index 0000000..e6bda84 --- /dev/null +++ b/patches/patch.2013.space.txt @@ -0,0 +1,18 @@ +--- src/http/ngx_http_parse.c ++++ src/http/ngx_http_parse.c +@@ -617,6 +617,7 @@ ngx_http_parse_request_line(ngx_http_req + default: + r->space_in_uri = 1; + state = sw_check_uri; ++ p--; + break; + } + break; +@@ -670,6 +671,7 @@ ngx_http_parse_request_line(ngx_http_req + default: + r->space_in_uri = 1; + state = sw_uri; ++ p--; + break; + } + break; diff --git a/util/mirror-tarballs b/util/mirror-tarballs index dd9d25b..8eb92f0 100755 --- a/util/mirror-tarballs +++ b/util/mirror-tarballs @@ -203,6 +203,13 @@ echo "$info_txt applying the cache_manager_exit patch for nginx $ver" patch -p1 < $root/patches/nginx-$ver-cache_manager_exit.patch || exit 1 echo +answer=`$root/util/ver-ge "$main_ver" 1.4.4` +if [ "$answer" = "N" ]; then + echo "$info_txt applying the CVE-2013-4547 patch for nginx $ver" + patch -p0 < $root/patches/patch.2013.space.txt || exit 1 + echo +fi + rm -f *.patch || exit 1 cd .. || exit 1 diff --git a/util/ver b/util/ver index 87345e5..ce5fe8b 100755 --- a/util/ver +++ b/util/ver @@ -2,7 +2,7 @@ #main_ver=1.5.4 main_ver=1.4.3 -minor_ver=4 +minor_ver=6 version=$main_ver.$minor_ver echo $version