1. 18 1月, 2013 1 次提交
    • N
      net/xfrm/xfrm_replay: avoid division by zero · e2f67259
      Nickolai Zeldovich 提交于
      All of the xfrm_replay->advance functions in xfrm_replay.c check if
      x->replay_esn->replay_window is zero (and return if so).  However,
      one of them, xfrm_replay_advance_bmp(), divides by that value (in the
      '%' operator) before doing the check, which can potentially trigger
      a divide-by-zero exception.  Some compilers will also assume that the
      earlier division means the value cannot be zero later, and thus will
      eliminate the subsequent zero check as dead code.
      
      This patch moves the division to after the check.
      Signed-off-by: NNickolai Zeldovich <nickolai@csail.mit.edu>
      Signed-off-by: NSteffen Klassert <steffen.klassert@secunet.com>
      e2f67259
  2. 08 11月, 2012 1 次提交
  3. 05 9月, 2012 1 次提交
  4. 23 3月, 2012 1 次提交
  5. 01 11月, 2011 1 次提交
  6. 19 10月, 2011 1 次提交
  7. 08 6月, 2011 1 次提交
  8. 11 5月, 2011 1 次提交
    • S
      xfrm: Don't allow esn with disabled anti replay detection · 6fa5ddcc
      Steffen Klassert 提交于
      Unlike the standard case, disabled anti replay detection needs some
      nontrivial extra treatment on ESN. RFC 4303 states:
      
      Note: If a receiver chooses to not enable anti-replay for an SA, then
      the receiver SHOULD NOT negotiate ESN in an SA management protocol.
      Use of ESN creates a need for the receiver to manage the anti-replay
      window (in order to determine the correct value for the high-order
      bits of the ESN, which are employed in the ICV computation), which is
      generally contrary to the notion of disabling anti-replay for an SA.
      
      So return an error if an ESN state with disabled anti replay detection
      is inserted for now and add the extra treatment later if we need it.
      Signed-off-by: NSteffen Klassert <steffen.klassert@secunet.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6fa5ddcc
  9. 27 4月, 2011 1 次提交
  10. 29 3月, 2011 1 次提交
  11. 14 3月, 2011 3 次提交