Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1278315 > unrolled thread
| Started by | Al Viro <viro@ZenIV.linux.org.uk> |
|---|---|
| First post | 2015-11-26 17:10 +0100 |
| Last post | 2015-11-26 21:30 +0100 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[[PATCH] fix an endianness bug in ext4_encrypted_zeroout() Al Viro <viro@ZenIV.linux.org.uk> - 2015-11-26 17:10 +0100
Re: [[PATCH] fix an endianness bug in ext4_encrypted_zeroout() Theodore Ts'o <tytso@mit.edu> - 2015-11-26 21:30 +0100
| From | Al Viro <viro@ZenIV.linux.org.uk> |
|---|---|
| Date | 2015-11-26 17:10 +0100 |
| Subject | [[PATCH] fix an endianness bug in ext4_encrypted_zeroout() |
| Message-ID | <qz7ho-7tT-13@gated-at.bofh.it> |
ex->ee_block is not host-endian (note that accesses of other fields of *ex right next to that line go through the helpers that do proper conversion from little-endian to host-endian; it might make sense to add similar for ->ee_block to avoid reintroducing that kind of bugs...) Cc: stable@vger.kernel.org # v4.1+ Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> --- diff --git a/fs/ext4/crypto.c b/fs/ext4/crypto.c index af06830..1a08350 100644 --- a/fs/ext4/crypto.c +++ b/fs/ext4/crypto.c @@ -389,7 +389,7 @@ int ext4_encrypted_zeroout(struct inode *inode, struct ext4_extent *ex) struct ext4_crypto_ctx *ctx; struct page *ciphertext_page = NULL; struct bio *bio; - ext4_lblk_t lblk = ex->ee_block; + ext4_lblk_t lblk = le32_to_cpu(ex->ee_block); ext4_fsblk_t pblk = ext4_ext_pblock(ex); unsigned int len = ext4_ext_get_actual_len(ex); int ret, err = 0; -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Theodore Ts'o <tytso@mit.edu> |
|---|---|
| Date | 2015-11-26 21:30 +0100 |
| Message-ID | <qzbkZ-1y5-1@gated-at.bofh.it> |
| In reply to | #1278315 |
On Thu, Nov 26, 2015 at 04:04:34PM +0000, Al Viro wrote: > ex->ee_block is not host-endian (note that accesses of other fields > of *ex right next to that line go through the helpers that do proper > conversion from little-endian to host-endian; it might make sense > to add similar for ->ee_block to avoid reintroducing that kind of > bugs...) > > Cc: stable@vger.kernel.org # v4.1+ > Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Thanks for catching this! Applied. - Ted -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web