mirror of
				https://git.kernel.org/pub/scm/network/wireless/iwd.git
				synced 2025-11-04 00:37:22 +01:00 
			
		
		
		
	mpdu: Validate probe request mpdu subtype
We do not currently validate the IEs that are following until the end of the frame
This commit is contained in:
		
							parent
							
								
									142a6a8a0c
								
							
						
					
					
						commit
						cc1cc64843
					
				@ -127,6 +127,9 @@ static bool validate_mgmt_mpdu(const struct mpdu *mpdu, int len, int *offset)
 | 
			
		||||
	case MPDU_MANAGEMENT_SUBTYPE_REASSOCIATION_RESPONSE:
 | 
			
		||||
		return validate_on_ies_start_position_mgmt_mpdu(mpdu, len,
 | 
			
		||||
								offset, 9);
 | 
			
		||||
	case MPDU_MANAGEMENT_SUBTYPE_PROBE_REQUEST:
 | 
			
		||||
		return validate_on_ies_start_position_mgmt_mpdu(mpdu, len,
 | 
			
		||||
								offset, 0);
 | 
			
		||||
	case MPDU_MANAGEMENT_SUBTYPE_ATIM:
 | 
			
		||||
		return validate_atim_mgmt_mpdu(mpdu, len, offset);
 | 
			
		||||
	case MPDU_MANAGEMENT_SUBTYPE_DISASSOCIATION:
 | 
			
		||||
 | 
			
		||||
@ -36,6 +36,7 @@ enum mpdu_management_subtype {
 | 
			
		||||
	MPDU_MANAGEMENT_SUBTYPE_ASSOCIATION_RESPONSE   = 0x1,
 | 
			
		||||
	MPDU_MANAGEMENT_SUBTYPE_REASSOCIATION_REQUEST  = 0x2,
 | 
			
		||||
	MPDU_MANAGEMENT_SUBTYPE_REASSOCIATION_RESPONSE = 0x3,
 | 
			
		||||
	MPDU_MANAGEMENT_SUBTYPE_PROBE_REQUEST          = 0x4,
 | 
			
		||||
	MPDU_MANAGEMENT_SUBTYPE_ATIM                   = 0x9,
 | 
			
		||||
	MPDU_MANAGEMENT_SUBTYPE_DISASSOCIATION         = 0xA,
 | 
			
		||||
	MPDU_MANAGEMENT_SUBTYPE_AUTHENTICATION         = 0xB,
 | 
			
		||||
@ -179,6 +180,11 @@ struct mpdu_disassociation {
 | 
			
		||||
	uint8_t ies[0];
 | 
			
		||||
} __attribute__ ((packed));
 | 
			
		||||
 | 
			
		||||
/* 802.11, Section 8.3.3.9 */
 | 
			
		||||
struct mpdu_probe_request {
 | 
			
		||||
	uint8_t ies[0];
 | 
			
		||||
} __attribute__ ((packed));
 | 
			
		||||
 | 
			
		||||
/* 802.11, Section 8.3.3.11 */
 | 
			
		||||
struct mpdu_authentication {
 | 
			
		||||
	__le16 algorithm;
 | 
			
		||||
@ -209,6 +215,7 @@ struct mpdu {
 | 
			
		||||
		struct mpdu_association_response assoc_resp;
 | 
			
		||||
		struct mpdu_reassociation_request reassoc_req;
 | 
			
		||||
		struct mpdu_reassociation_response reassoc_resp;
 | 
			
		||||
		struct mpdu_probe_request probe_req;
 | 
			
		||||
		struct mpdu_disassociation disassoc;
 | 
			
		||||
		struct mpdu_authentication auth;
 | 
			
		||||
		struct mpdu_deauthentication deauth;
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user