Re: dm-crypt accepts '+' in the key

2016-11-14 Thread Mikulas Patocka
On Mon, 14 Nov 2016, Alexey Dobriyan wrote: > On Sun, Nov 13, 2016 at 03:45:27PM +0100, Milan Broz wrote: > > On 11/12/2016 09:20 PM, Mikulas Patocka wrote: > > > Hi > > > > > > dm-crypt uses the function kstrtou8 to decode the encryption key. > > > kstrtou8 > > > calls kstrtoull and

Re: dm-crypt accepts '+' in the key

2016-11-14 Thread Mikulas Patocka
On Mon, 14 Nov 2016, Alexey Dobriyan wrote: > On Sun, Nov 13, 2016 at 03:45:27PM +0100, Milan Broz wrote: > > On 11/12/2016 09:20 PM, Mikulas Patocka wrote: > > > Hi > > > > > > dm-crypt uses the function kstrtou8 to decode the encryption key. > > > kstrtou8 > > > calls kstrtoull and

Re: dm-crypt accepts '+' in the key

2016-11-13 Thread Alexey Dobriyan
On Sun, Nov 13, 2016 at 03:45:27PM +0100, Milan Broz wrote: > On 11/12/2016 09:20 PM, Mikulas Patocka wrote: > > Hi > > > > dm-crypt uses the function kstrtou8 to decode the encryption key. kstrtou8 > > calls kstrtoull and kstrtoull skips the first character if it is '+'. > > > > Consequently,

Re: dm-crypt accepts '+' in the key

2016-11-13 Thread Alexey Dobriyan
On Sun, Nov 13, 2016 at 03:45:27PM +0100, Milan Broz wrote: > On 11/12/2016 09:20 PM, Mikulas Patocka wrote: > > Hi > > > > dm-crypt uses the function kstrtou8 to decode the encryption key. kstrtou8 > > calls kstrtoull and kstrtoull skips the first character if it is '+'. > > > > Consequently,

Re: dm-crypt accepts '+' in the key

2016-11-13 Thread Milan Broz
On 11/12/2016 09:20 PM, Mikulas Patocka wrote: > Hi > > dm-crypt uses the function kstrtou8 to decode the encryption key. kstrtou8 > calls kstrtoull and kstrtoull skips the first character if it is '+'. > > Consequently, it is possible to load keys with '+' in it. For example, > this is

Re: dm-crypt accepts '+' in the key

2016-11-13 Thread Milan Broz
On 11/12/2016 09:20 PM, Mikulas Patocka wrote: > Hi > > dm-crypt uses the function kstrtou8 to decode the encryption key. kstrtou8 > calls kstrtoull and kstrtoull skips the first character if it is '+'. > > Consequently, it is possible to load keys with '+' in it. For example, > this is

dm-crypt accepts '+' in the key

2016-11-12 Thread Mikulas Patocka
Hi dm-crypt uses the function kstrtou8 to decode the encryption key. kstrtou8 calls kstrtoull and kstrtoull skips the first character if it is '+'. Consequently, it is possible to load keys with '+' in it. For example, this is possible: dmsetup create cr --table "0 131072 crypt

dm-crypt accepts '+' in the key

2016-11-12 Thread Mikulas Patocka
Hi dm-crypt uses the function kstrtou8 to decode the encryption key. kstrtou8 calls kstrtoull and kstrtoull skips the first character if it is '+'. Consequently, it is possible to load keys with '+' in it. For example, this is possible: dmsetup create cr --table "0 131072 crypt