Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
KEYS: fix parsing invalid pkey info string
We need to check the return value of match_token() for Opt_err before doing anything with it. [ Not only did the old "-1" value for Opt_err cause problems for the __test_and_set_bit(), as fixed in commit 94c13f6 ("security: don't use a negative Opt_err token index"), but accessing "args[0].from" is invalid for the Opt_err case, as pointed out by Eric later. - Linus ] Reported-by: [email protected] Fixes: 00d60fd ("KEYS: Provide keyctls to drive the new key type ops for asymmetric keys [ver #2]") Signed-off-by: Eric Biggers <[email protected]> Cc: [email protected] # 4.20 Signed-off-by: Linus Torvalds <[email protected]>
- Loading branch information