Commit 6b8fdea
dm crypt: fix crash by adding missing check for auth key size
commit 27c7003 upstream.
If dm-crypt uses authenticated mode with separate MAC, there are two
concatenated part of the key structure - key(s) for encryption and
authentication key.
Add a missing check for authenticated key length. If this key length is
smaller than actually provided key, dm-crypt now properly fails instead
of crashing.
Fixes: ef43aa3 ("dm crypt: add cryptographic data integrity protection (authenticated encryption)")
Reported-by: Salah Coronya <salahx@yahoo.com>
Signed-off-by: Milan Broz <gmazyland@gmail.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>1 parent c808f1d commit 6b8fdea
1 file changed
Lines changed: 6 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1954 | 1954 | | |
1955 | 1955 | | |
1956 | 1956 | | |
1957 | | - | |
| 1957 | + | |
| 1958 | + | |
| 1959 | + | |
| 1960 | + | |
1958 | 1961 | | |
1959 | 1962 | | |
1960 | 1963 | | |
| 1964 | + | |
| 1965 | + | |
1961 | 1966 | | |
1962 | 1967 | | |
1963 | 1968 | | |
| |||
0 commit comments