Skip to content

Commit

Permalink
pfkey: fix SADB_X_EXT_FILTER length check
Browse files Browse the repository at this point in the history
This patch fixes commit d362309 ("ipsec: add support of limited SA dump").

sadb_ext_min_len array should be updated with the new type (SADB_X_EXT_FILTER).

Reported-by: Dan Carpenter <[email protected]>
Signed-off-by: Nicolas Dichtel <[email protected]>
Signed-off-by: Steffen Klassert <[email protected]>
  • Loading branch information
NicolasDichtel authored and klassert committed Feb 21, 2014
1 parent 1a1ccc9 commit d2c5f65
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions net/key/af_key.c
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,7 @@ static const u8 sadb_ext_min_len[] = {
[SADB_X_EXT_NAT_T_OA] = (u8) sizeof(struct sadb_address),
[SADB_X_EXT_SEC_CTX] = (u8) sizeof(struct sadb_x_sec_ctx),
[SADB_X_EXT_KMADDRESS] = (u8) sizeof(struct sadb_x_kmaddress),
[SADB_X_EXT_FILTER] = (u8) sizeof(struct sadb_x_filter),
};

/* Verify sadb_address_{len,prefixlen} against sa_family. */
Expand Down

0 comments on commit d2c5f65

Please sign in to comment.