summaryrefslogtreecommitdiff
path: root/scp.c
diff options
context:
space:
mode:
authordtucker@openbsd.org <dtucker@openbsd.org>2019-01-23 08:01:46 +0000
committerColin Watson <cjwatson@debian.org>2019-02-08 15:38:28 +0000
commit11b88754cadcad0ba79b4ffcc127223248dccb54 (patch)
tree2c9793f792675bc79de7f7a3bcae66cdfaa719ca /scp.c
parentdee21e97428e69d30e2d15c71f3e7cc08bf8e4f8 (diff)
upstream: Sanitize scp filenames via snmprintf. To do this we move
the progressmeter formatting outside of signal handler context and have the atomicio callback called for EINTR too. bz#2434 with contributions from djm and jjelen at redhat.com, ok djm@ OpenBSD-Commit-ID: 1af61c1f70e4f3bd8ab140b9f1fa699481db57d8 CVE-2019-6109 Origin: backport, https://anongit.mindrot.org/openssh.git/commit/?id=8976f1c4b2721c26e878151f52bdf346dfe2d54c Bug-Debian: https://bugs.debian.org/793412 Last-Update: 2019-02-08 Patch-Name: sanitize-scp-filenames-via-snmprintf.patch
Diffstat (limited to 'scp.c')
-rw-r--r--scp.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/scp.c b/scp.c
index 7163d33dc..80308573c 100644
--- a/scp.c
+++ b/scp.c
@@ -593,6 +593,7 @@ scpio(void *_cnt, size_t s)
593 off_t *cnt = (off_t *)_cnt; 593 off_t *cnt = (off_t *)_cnt;
594 594
595 *cnt += s; 595 *cnt += s;
596 refresh_progress_meter();
596 if (limit_kbps > 0) 597 if (limit_kbps > 0)
597 bandwidth_limit(&bwlimit, s); 598 bandwidth_limit(&bwlimit, s);
598 return 0; 599 return 0;