GoCryptFS/Problembehebung: Unterschied zwischen den Versionen

Aus Foxwiki
Die Seite wurde neu angelegt: „ == Corrupt Block == Message in the logs <code>Feb 8 15:46:21 machine gocryptfs[1123]: DecryptBlock: cipher: message authentication failed, len=560</code> <code>Feb 8 15:46:21 machine gocryptfs[1123]: ino8004098: doRead: corrupt block #2: cipher: message authentication failed</code> <code>Feb 8 15:46:21 machine gocryptfs[1123]: ino8004098: Read: returning EIO, offset=12288, length=0</code> <code>Feb 8 15:46:21 machine gocryptfs[1123]: DecryptBlock…“
 
Keine Bearbeitungszusammenfassung
 
(Eine dazwischenliegende Version desselben Benutzers wird nicht angezeigt)
Zeile 33: Zeile 33:
The test was updated successfully, but these errors were encountered.
The test was updated successfully, but these errors were encountered.


==== rfjakob commented Feb 8, 2018 ====
==== decode the message ====
Hi, let's decode the message:
  <code>ino8004098: doRead: corrupt block #2</code>
  <code>ino8004098: doRead: corrupt block #2</code>
     <code>^^^^^^^                  ^^^^^^^^</code>
     <code>^^^^^^^                  ^^^^^^^^</code>
Zeile 50: Zeile 49:
If you want to check all files, there is no special tool for that yet, but you can just md5sum all your files an see if you get any read errors. In your mounted gocryptfs, you could do this:
If you want to check all files, there is no special tool for that yet, but you can just md5sum all your files an see if you get any read errors. In your mounted gocryptfs, you could do this:
  <code>find . -type f -print0 | xargs -0 md5sum</code>
  <code>find . -type f -print0 | xargs -0 md5sum</code>
<noinclude>
[[Kategorie:Dateisystem/Kryptografie]]
</noinclude>

Aktuelle Version vom 19. Oktober 2024, 08:44 Uhr

Corrupt Block

Message in the logs

Feb  8 15:46:21 machine gocryptfs[1123]: DecryptBlock: cipher: message authentication failed, len=560
Feb  8 15:46:21 machine gocryptfs[1123]: ino8004098: doRead: corrupt block #2: cipher: message authentication failed
Feb  8 15:46:21 machine gocryptfs[1123]: ino8004098: Read: returning EIO, offset=12288, length=0
Feb  8 15:46:21 machine gocryptfs[1123]: DecryptBlock: cipher: message authentication failed, len=560
Feb  8 15:46:21 machine gocryptfs[1123]: ino8004098: doRead: corrupt block #2: cipher: message authentication failed
Feb  8 15:46:21 machine gocryptfs[1123]: ino8004098 fh292: RMW read failed: 5=input/output error
Feb  8 15:46:21 machine gocryptfs[1123]: DecryptBlock: cipher: message authentication failed, len=560
Feb  8 15:46:21 machine gocryptfs[1123]: ino8004098: doRead: corrupt block #2: cipher: message authentication failed
Feb  8 15:46:21 machine gocryptfs[1123]: ino8004098: Read: returning EIO, offset=4096, length=8192
Feb  8 15:46:21 machine gocryptfs[1123]: DecryptBlock: cipher: message authentication failed, len=560
Feb  8 15:46:21 machine gocryptfs[1123]: ino8004098: doRead: corrupt block #2: cipher: message authentication failed
Feb  8 15:46:21 machine gocryptfs[1123]: ino8004098: Read: returning EIO, offset=4096, length=8192
Feb  8 15:48:11 machine gocryptfs[1123]: DecryptBlock: cipher: message authentication failed, len=560
Feb  8 15:48:11 machine gocryptfs[1123]: ino8004098: doRead: corrupt block #2: cipher: message authentication failed
Feb  8 15:48:11 machine gocryptfs[1123]: ino8004098: Read: returning EIO, offset=12288, length=0
Feb  8 15:48:11 machine gocryptfs[1123]: DecryptBlock: cipher: message authentication failed, len=560
Feb  8 15:48:11 machine gocryptfs[1123]: ino8004098: doRead: corrupt block #2: cipher: message authentication failed
Feb  8 15:48:11 machine gocryptfs[1123]: ino8004098: Read: returning EIO, offset=12288, length=0
Feb  8 15:48:11 machine gocryptfs[1123]: DecryptBlock: cipher: message authentication failed, len=560
Feb  8 15:48:11 machine gocryptfs[1123]: ino8004098: doRead: corrupt block #2: cipher: message authentication failed
Feb  8 15:48:11 machine gocryptfs[1123]: ino8004098 fh28: RMW read failed: 5=input/output error
Feb  8 15:48:11 machine gocryptfs[1123]: DecryptBlock: cipher: message authentication failed, len=560
Feb  8 15:48:11 machine gocryptfs[1123]: ino8004098: doRead: corrupt block #2: cipher: message authentication failed
Feb  8 15:48:11 machine gocryptfs[1123]: ino8004098: Read: returning EIO, offset=4096, length=8192
Feb  8 15:48:11 machine gocryptfs[1123]: DecryptBlock: cipher: message authentication failed, len=560
Feb  8 15:48:11 machine gocryptfs[1123]: ino8004098: doRead: corrupt block #2: cipher: message authentication failed
Feb  8 15:48:11 machine gocryptfs[1123]: ino8004098: Read: returning EIO, offset=4096, length=8192

I already run fsck on the disk. How I can detect what files were affected? There is a file integrity verifier? Could be possible to include in the log more information to detect where the problem is?

The test was updated successfully, but these errors were encountered.

decode the message

ino8004098: doRead: corrupt block #2
   ^^^^^^^                  ^^^^^^^^
   the problem affects      ciphertext block
   the inode number         #2 is affected
   8004098

It is intentional that no file name is logged, as this could leak information. But you can find the file using the inode number: Use

find . -inum 8004098

in your mounted gocryptfs filesystem, and you should get the file name.

As for what part of the file is affected, ciphertext blocks are 4096 bytes long, so we have

block #0 = byte    0 to  4096
block #1 = byte 4097 to  8194
block #2 = byte 8195 to 12288  <-- this block is corrupt

If you want to check all files, there is no special tool for that yet, but you can just md5sum all your files an see if you get any read errors. In your mounted gocryptfs, you could do this:

find . -type f -print0 | xargs -0 md5sum