gnu: libtiff: Fix CVE-2022-34526.
* gnu/packages/patches/libtiff-CVE-2022-34526.patch: New file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/image.scm (libtiff)[source](patches): New field.
This commit is contained in:
		
							parent
							
								
									bbc99d0c23
								
							
						
					
					
						commit
						c7966ba3ef
					
				
					 3 changed files with 24 additions and 0 deletions
				
			
		| 
						 | 
					@ -1416,6 +1416,7 @@ dist_patch_DATA =						\
 | 
				
			||||||
  %D%/packages/patches/libtgvoip-disable-sse2.patch 		\
 | 
					  %D%/packages/patches/libtgvoip-disable-sse2.patch 		\
 | 
				
			||||||
  %D%/packages/patches/libtgvoip-disable-webrtc.patch 		\
 | 
					  %D%/packages/patches/libtgvoip-disable-webrtc.patch 		\
 | 
				
			||||||
  %D%/packages/patches/libtheora-config-guess.patch		\
 | 
					  %D%/packages/patches/libtheora-config-guess.patch		\
 | 
				
			||||||
 | 
					  %D%/packages/patches/libtiff-CVE-2022-34526.patch		\
 | 
				
			||||||
  %D%/packages/patches/libtirpc-CVE-2021-46828.patch		\
 | 
					  %D%/packages/patches/libtirpc-CVE-2021-46828.patch		\
 | 
				
			||||||
  %D%/packages/patches/libtirpc-hurd.patch			\
 | 
					  %D%/packages/patches/libtirpc-hurd.patch			\
 | 
				
			||||||
  %D%/packages/patches/libtommath-fix-linkage.patch		\
 | 
					  %D%/packages/patches/libtommath-fix-linkage.patch		\
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -575,6 +575,7 @@ extracting icontainer icon files.")
 | 
				
			||||||
       (method url-fetch)
 | 
					       (method url-fetch)
 | 
				
			||||||
       (uri (string-append "https://download.osgeo.org/libtiff/tiff-"
 | 
					       (uri (string-append "https://download.osgeo.org/libtiff/tiff-"
 | 
				
			||||||
                           version ".tar.xz"))
 | 
					                           version ".tar.xz"))
 | 
				
			||||||
 | 
					       (patches (search-patches "libtiff-CVE-2022-34526.patch"))
 | 
				
			||||||
       (sha256
 | 
					       (sha256
 | 
				
			||||||
        (base32
 | 
					        (base32
 | 
				
			||||||
         "1h8xrcpbyf9id2hw2ms0cmpgx0li8gladjzj82ycgk28018pnc29"))))
 | 
					         "1h8xrcpbyf9id2hw2ms0cmpgx0li8gladjzj82ycgk28018pnc29"))))
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										22
									
								
								gnu/packages/patches/libtiff-CVE-2022-34526.patch
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										22
									
								
								gnu/packages/patches/libtiff-CVE-2022-34526.patch
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,22 @@
 | 
				
			||||||
 | 
					Fix CVE-2022-34526:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  https://nvd.nist.gov/vuln/detail/CVE-2022-34526
 | 
				
			||||||
 | 
					  https://gitlab.com/libtiff/libtiff/-/issues/433
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Patch taken from upstream source repository:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  https://gitlab.com/libtiff/libtiff/-/commit/275735d0354e39c0ac1dc3c0db2120d6f31d1990
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					diff --git a/libtiff/tif_dirinfo.c b/libtiff/tif_dirinfo.c
 | 
				
			||||||
 | 
					--- a/libtiff/tif_dirinfo.c
 | 
				
			||||||
 | 
					+++ b/libtiff/tif_dirinfo.c
 | 
				
			||||||
 | 
					@@ -1191,6 +1191,9 @@ _TIFFCheckFieldIsValidForCodec(TIFF *tif, ttag_t tag)
 | 
				
			||||||
 | 
					 	    default:
 | 
				
			||||||
 | 
					 		return 1;
 | 
				
			||||||
 | 
					 	}
 | 
				
			||||||
 | 
					+	if( !TIFFIsCODECConfigured(tif->tif_dir.td_compression) ) {
 | 
				
			||||||
 | 
					+		return 0;
 | 
				
			||||||
 | 
					+	}
 | 
				
			||||||
 | 
					 	/* Check if codec specific tags are allowed for the current
 | 
				
			||||||
 | 
					 	 * compression scheme (codec) */
 | 
				
			||||||
 | 
					 	switch (tif->tif_dir.td_compression) {
 | 
				
			||||||
		Reference in a new issue