The branch, master has been updated
       via  788f11ea Fix zlib bug with a large gzip header extra field
      from  b7fdc9ef Make sure that --read-batch doesn't try to check args.

https://git.samba.org/?p=rsync.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 788f11ea6afeb96f0d84f140192165a1ca12ade4
Author: Wayne Davison <wa...@opencoder.net>
Date:   Sun Aug 7 09:27:57 2022 -0700

    Fix zlib bug with a large gzip header extra field
    
    From zlib commit eff308af425b67093bab25f80f1ae950166bece1.
    Fixes CVE-2022-37434.

-----------------------------------------------------------------------

Summary of changes:
 zlib/inflate.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/zlib/inflate.c b/zlib/inflate.c
index e43abd9e..d15132ea 100644
--- a/zlib/inflate.c
+++ b/zlib/inflate.c
@@ -739,9 +739,10 @@ int flush;
                 copy = state->length;
                 if (copy > have) copy = have;
                 if (copy) {
+                    len = state->head->extra_len - state->length;
                     if (state->head != Z_NULL &&
-                        state->head->extra != Z_NULL) {
-                        len = state->head->extra_len - state->length;
+                        state->head->extra != Z_NULL &&
+                        len < state->head->extra_max) {
                         zmemcpy(state->head->extra + len, next,
                                 len + copy > state->head->extra_max ?
                                 state->head->extra_max - len : copy);


-- 
The rsync repository.

_______________________________________________
rsync-cvs mailing list
rsync-cvs@lists.samba.org
https://lists.samba.org/mailman/listinfo/rsync-cvs

Reply via email to