summaryrefslogtreecommitdiff
path: root/tools/lib/python/kdoc/python_version.py
diff options
context:
space:
mode:
authorThorsten Blum <thorsten.blum@linux.dev>2026-08-13 10:13:36 +0200
committerMikulas Patocka <mpatocka@redhat.com>2026-09-17 14:54:22 +0200
commitba56ca86f925f639d2d1d529dda2bf534fd8b853 (patch)
tree3dee05d58dfc96c3a40de718534954587ad64f7c /tools/lib/python/kdoc/python_version.py
parent769d5353c8e61c1f50a4843839514b5569321eb8 (diff)
dm-crypt: Reject malformed raw keys in crypt_set_key()
dm-crypt calculates the raw key size by dividing the hex string length by two. If the string has an odd number of characters, the key size is rounded down and hex2bin() only decodes complete byte pairs. For example, a 33-character raw key string is malformed, but dm-crypt treats it as a 16-byte key and ignores the last character. Reject raw key strings whose length does not match the expected number of hex characters. This restores the trailing character check that was lost when the open-coded decoder was replaced with hex2bin(). Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev> Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Diffstat (limited to 'tools/lib/python/kdoc/python_version.py')
0 files changed, 0 insertions, 0 deletions