Re: Exhaustive key reading seems to silently stop on error

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

 



Hi!

(De-TOFU-ized.)

> On Wed, Dec 09, 2009 at 11:25:53PM +0100, Nico R. wrote:
[…]
>> In lib/utils.c (line 450f. in cryptsetup-1.0.7; line 490f. in current
>> SVN revision, r132, equal to r152), we see the following code:
>>
>> if(read(fd, pass + i, 1) != 1 || (newline_stop && pass[i] == '\n'))
>>         break;
>>
>> If I interpret that snipped (and its surroundings) correctly, the code
>> will read until EOF *or* until an error occurs.
>>
>> If my interpretation is true, that code causes a problem:
[…]

Arno Wagner wrote:
> Hmm. This seems to indeed be a bug.
> 
> I gather there is no code later that distinguishes 
> EOF and error and deals with the second possibility?

As far as I can see, there is not. See
<URL:http://code.google.com/p/cryptsetup/source/browse/trunk/lib/utils.c?r=132#480>.
-- 
Nico

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
dm-crypt mailing list
dm-crypt@xxxxxxxx
http://www.saout.de/mailman/listinfo/dm-crypt

[Index of Archives]     [Device Mapper Devel]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux