1. Aug 10, 2022
    • Pablo Neira Ayuso's avatar
      netfilter: nf_tables: validate variable length element extension · 34aae2c2
      Pablo Neira Ayuso authored
      Update template to validate variable length extensions. This patch adds
      a new .ext_len[id] field to the template to store the expected extension
      length. This is used to sanity check the initialization of the variable
      length extension.
      
      Use PTR_ERR() in nft_set_elem_init() to report errors since, after this
      update, there are two reason why this might fail, either because of
      ENOMEM or insufficient room in the extension field (EINVAL).
      
      Kernels up until 7e6bc1f6
      
       ("netfilter: nf_tables: stricter
      validation of element data") allowed to copy more data to the extension
      than was allocated. This ext_len field allows to validate if the
      destination has the correct size as additional check.
      
      Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
      34aae2c2
  2. Aug 09, 2022
  3. Aug 08, 2022
  4. Aug 06, 2022