Re: HIFN+IPsec crashes in current -git

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Patrick McHardy wrote:
Evgeniy Polyakov wrote:
On Thu, Feb 21, 2008 at 03:20:45PM +0100, Patrick McHardy (kaber@xxxxxxxxx) wrote:
Almost I guess :) There are similar loops in hifn_setup_session().
Additionally we need to check that the return value of ablkcipher_walk()
is not a negative errno code.

Yep. Kind of this one:

Thanks, I'll give it a try. It includes one chunk I missed when
trying this myself, which might explain the problems I saw
afterwards.

Unfortunately still no luck. I got an error from ablkcipher_add()
because of this condition:

    if (drest < size || size > nbytes)

with size=124 any nbytes=112. After changing ablkcipher_walk():

- unsigned slen = src->length - offset
+ unsigned slen = min(src->length, nbytes) - offset;

the error went away and I got a silent crash (at least
nothing was logged over netconsole).

It also looks like at least two more changes are needed:

- hifn_setup_session does:

                if (src->length & (blocksize - 1) ||
..
                                dst->length & (blocksize - 1) ||

                        ctx->walk.flags |= ASYNC_FLAGS_MISALIGNED;

which looks like it should use min(length, nbytes).

- further down it uses dst->length in the last while-loop,
  which seems to need a similar change.

-
To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]

  Powered by Linux