mirror of
				https://github.com/clearml/dropbear
				synced 2025-06-26 18:17:32 +00:00 
			
		
		
		
	limit rsa->e size to 64 bits
This commit is contained in:
		
							parent
							
								
									5fd677af76
								
							
						
					
					
						commit
						67111efdad
					
				
							
								
								
									
										6
									
								
								rsa.c
									
									
									
									
									
								
							
							
						
						
									
										6
									
								
								rsa.c
									
									
									
									
									
								
							| @ -68,6 +68,12 @@ int buf_get_rsa_pub_key(buffer* buf, dropbear_rsa_key *key) { | |||||||
| 		goto out; | 		goto out; | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
|  | 	/* 64 bit is limit used by openssl, so we won't block any keys in the wild */ | ||||||
|  | 	if (mp_count_bits(key->e) > 64) { | ||||||
|  | 		dropbear_log(LOG_WARNING, "RSA key bad e"); | ||||||
|  | 		goto out; | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
| 	TRACE(("leave buf_get_rsa_pub_key: success")) | 	TRACE(("leave buf_get_rsa_pub_key: success")) | ||||||
| 	ret = DROPBEAR_SUCCESS; | 	ret = DROPBEAR_SUCCESS; | ||||||
| out: | out: | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user