mirror of
				https://git.kernel.org/pub/scm/network/wireless/iwd.git
				synced 2025-10-31 13:17:25 +01:00 
			
		
		
		
	wscutil: Check authenticator more strictly
Make sure Authenticator is the last data in the WSC PDU, with no extraneous data afterwards
This commit is contained in:
		
							parent
							
								
									c6f086d741
								
							
						
					
					
						commit
						b650b16d6f
					
				| @ -700,6 +700,11 @@ static int wsc_parse_attrs(const unsigned char *pdu, unsigned int len, | ||||
| 			parse_error = true; | ||||
| 			goto done; | ||||
| 		} | ||||
| 
 | ||||
| 		if (wsc_attr_iter_get_pos(&iter) != len) { | ||||
| 			parse_error = true; | ||||
| 			goto done; | ||||
| 		} | ||||
| 	} | ||||
| 
 | ||||
| 	/*
 | ||||
|  | ||||
| @ -324,6 +324,11 @@ static inline const unsigned char *wsc_attr_iter_get_data( | ||||
| 	return iter->data; | ||||
| } | ||||
| 
 | ||||
| static inline unsigned int wsc_attr_iter_get_pos(struct wsc_attr_iter *iter) | ||||
| { | ||||
| 	return iter->pos; | ||||
| } | ||||
| 
 | ||||
| struct wsc_primary_device_type { | ||||
| 	uint16_t category; | ||||
| 	uint8_t oui[3]; | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Denis Kenzior
						Denis Kenzior