1. 05 6月, 2014 1 次提交
  2. 02 4月, 2014 1 次提交
    • P
      netlink: don't compare the nul-termination in nla_strcmp · 8b7b9324
      Pablo Neira 提交于
      nla_strcmp compares the string length plus one, so it's implicitly
      including the nul-termination in the comparison.
      
       int nla_strcmp(const struct nlattr *nla, const char *str)
       {
              int len = strlen(str) + 1;
              ...
                      d = memcmp(nla_data(nla), str, len);
      
      However, if NLA_STRING is used, userspace can send us a string without
      the nul-termination. This is a problem since the string
      comparison will not match as the last byte may be not the
      nul-termination.
      
      Fix this by skipping the comparison of the nul-termination if the
      attribute data is nul-terminated. Suggested by Thomas Graf.
      
      Cc: Florian Westphal <fw@strlen.de>
      Cc: Thomas Graf <tgraf@suug.ch>
      Signed-off-by: NPablo Neira Ayuso <pablo@netfilter.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8b7b9324
  3. 31 8月, 2012 1 次提交
  4. 08 3月, 2012 1 次提交
  5. 05 11月, 2011 1 次提交
    • J
      netlink: validate NLA_MSECS length · c30bc947
      Johannes Berg 提交于
      L2TP for example uses NLA_MSECS like this:
      policy:
              [L2TP_ATTR_RECV_TIMEOUT]        = { .type = NLA_MSECS, },
      code:
              if (info->attrs[L2TP_ATTR_RECV_TIMEOUT])
                      cfg.reorder_timeout = nla_get_msecs(info->attrs[L2TP_ATTR_RECV_TIMEOUT]);
      
      As nla_get_msecs() is essentially nla_get_u64() plus the
      conversion to a HZ-based value, this will not properly
      reject attributes from userspace that aren't long enough
      and might overrun the message.
      
      Add NLA_MSECS to the attribute minlen array to check the
      size properly.
      
      Cc: Thomas Graf <tgraf@suug.ch>
      Cc: stable@vger.kernel.org
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c30bc947
  6. 01 3月, 2011 1 次提交
  7. 17 11月, 2010 1 次提交
  8. 02 11月, 2010 1 次提交
  9. 11 3月, 2009 1 次提交
  10. 04 3月, 2009 1 次提交
  11. 28 11月, 2008 1 次提交
  12. 29 10月, 2008 1 次提交
  13. 28 6月, 2008 1 次提交
  14. 04 6月, 2008 1 次提交
  15. 29 1月, 2008 1 次提交
  16. 11 10月, 2007 1 次提交
  17. 11 7月, 2007 1 次提交
  18. 08 6月, 2007 1 次提交
  19. 26 4月, 2007 1 次提交
  20. 23 9月, 2006 2 次提交
  21. 01 7月, 2006 1 次提交
  22. 10 11月, 2005 1 次提交