Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 921078 Details for
Bug 1122937
aarch64 AES crypto: block misalignment causes crash or data corruption and cryptsetup fails to activate partitions
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
A patch for the bug
arm64-aes-fix.patch (text/plain), 3.11 KB, created by
Mikuláš Patočka
on 2014-07-25 23:17:04 UTC
(
hide
)
Description:
A patch for the bug
Filename:
MIME Type:
Creator:
Mikuláš Patočka
Created:
2014-07-25 23:17:04 UTC
Size:
3.11 KB
patch
obsolete
>arm64 aes: fix encryption of unaligned data > >cryptsetup fails on arm64 when using kernel encryption via AF_ALG socket. >See https://bugzilla.redhat.com/show_bug.cgi?id=1122937 > >The bug is caused by incorrect handling of unaligned data in >arch/arm64/crypto/aes-glue.c. Cryptsetup creates a buffer than is aligned >on 8 bytes, but not on 16 bytes. It opens AF_ALG socket and uses the >socket to encrypt data in the buffer. The arm64 crypto accelerator causes >data corruption or crashes in the scatterwalk_pagedone. > >This patch fixes the bug by passing the residue bytes that were not >processed as the last parameter to blkcipher_walk_done. > >Signed-off-by: Mikulas Patocka <mpatocka@redhat.com> > >Index: linux-3.16.0-0.rc6.git1.1.fc21.aarch64/arch/arm64/crypto/aes-glue.c >=================================================================== >--- linux-3.16.0-0.rc6.git1.1.fc21.aarch64.orig/arch/arm64/crypto/aes-glue.c >+++ linux-3.16.0-0.rc6.git1.1.fc21.aarch64/arch/arm64/crypto/aes-glue.c >@@ -106,7 +106,7 @@ static int ecb_encrypt(struct blkcipher_ > for (first = 1; (blocks = (walk.nbytes / AES_BLOCK_SIZE)); first = 0) { > aes_ecb_encrypt(walk.dst.virt.addr, walk.src.virt.addr, > (u8 *)ctx->key_enc, rounds, blocks, first); >- err = blkcipher_walk_done(desc, &walk, 0); >+ err = blkcipher_walk_done(desc, &walk, walk.nbytes % AES_BLOCK_SIZE); > } > kernel_neon_end(); > return err; >@@ -128,7 +128,7 @@ static int ecb_decrypt(struct blkcipher_ > for (first = 1; (blocks = (walk.nbytes / AES_BLOCK_SIZE)); first = 0) { > aes_ecb_decrypt(walk.dst.virt.addr, walk.src.virt.addr, > (u8 *)ctx->key_dec, rounds, blocks, first); >- err = blkcipher_walk_done(desc, &walk, 0); >+ err = blkcipher_walk_done(desc, &walk, walk.nbytes % AES_BLOCK_SIZE); > } > kernel_neon_end(); > return err; >@@ -151,7 +151,7 @@ static int cbc_encrypt(struct blkcipher_ > aes_cbc_encrypt(walk.dst.virt.addr, walk.src.virt.addr, > (u8 *)ctx->key_enc, rounds, blocks, walk.iv, > first); >- err = blkcipher_walk_done(desc, &walk, 0); >+ err = blkcipher_walk_done(desc, &walk, walk.nbytes % AES_BLOCK_SIZE); > } > kernel_neon_end(); > return err; >@@ -174,7 +174,7 @@ static int cbc_decrypt(struct blkcipher_ > aes_cbc_decrypt(walk.dst.virt.addr, walk.src.virt.addr, > (u8 *)ctx->key_dec, rounds, blocks, walk.iv, > first); >- err = blkcipher_walk_done(desc, &walk, 0); >+ err = blkcipher_walk_done(desc, &walk, walk.nbytes % AES_BLOCK_SIZE); > } > kernel_neon_end(); > return err; >@@ -243,7 +243,7 @@ static int xts_encrypt(struct blkcipher_ > aes_xts_encrypt(walk.dst.virt.addr, walk.src.virt.addr, > (u8 *)ctx->key1.key_enc, rounds, blocks, > (u8 *)ctx->key2.key_enc, walk.iv, first); >- err = blkcipher_walk_done(desc, &walk, 0); >+ err = blkcipher_walk_done(desc, &walk, walk.nbytes % AES_BLOCK_SIZE); > } > kernel_neon_end(); > >@@ -267,7 +267,7 @@ static int xts_decrypt(struct blkcipher_ > aes_xts_decrypt(walk.dst.virt.addr, walk.src.virt.addr, > (u8 *)ctx->key1.key_dec, rounds, blocks, > (u8 *)ctx->key2.key_enc, walk.iv, first); >- err = blkcipher_walk_done(desc, &walk, 0); >+ err = blkcipher_walk_done(desc, &walk, walk.nbytes % AES_BLOCK_SIZE); > } > kernel_neon_end(); >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1122937
:
920928
|
920929
| 921078 |
921079