[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: announce: linux-int-2.4.3.1-hvr3
Herbert Valerio Riedel wrote:
> On Mon, 9 Apr 2001, Jari Ruusu wrote:
> > +static inline unsigned long loop_get_iv(struct loop_device *lo,
> > + unsigned long sector)
> > +{
> > + return sector - (lo->lo_offset >> IV_SECTOR_BITS);
> > ^^^^^^ LINE 348 - CORRUPTION ?
> > +}
> > +
>
> sorry, I don't see your point...
>
> the return value is supposed to be the sector address minus the offset
> expressed in sectors...
So, you anchor the IV beginning to "lo->lo_offset". But, what happens when
someone losetups a hard drive partition with a different offset than what
was used before? Unreadable data, that what. I'm not saying that is a normal
thing to do. If IV beginning is anchored to the beginning of a partition or
file, data would be readable no matter what offset is used.
Regards,
Jari Ruusu <jari.ruusu@pp.inet.fi>
Linux-crypto: cryptography in and on the Linux system
Archive: http://mail.nl.linux.org/linux-crypto/