key.c line 144
Maintainer,
Current mainline (5.14), source file:security/keys/key.c
line 144:
key->serial >>= 1; /* negative numbers are not permitted */
where serial is int32_t. >> 1 is not converting negative to positive. It is making a smaller negative value.
Regards,
Mike M.
This e-mail is from Ultra Electronics Defense, Inc. (or a subsidiary of). This message and any attachment may contain confidential, privileged or otherwise protected information. If you are not the intended recipient, please do not use, copy, forward or disclose the contents of this message or any attachment. Instead, please delete this message and any attachment from your system immediately. All communications may be subject to interception or monitoring for operational and/or security purposes. Please rely on your own virus checking as the sender cannot accept any liability for any damage arising from any bug or virus infection.
Quoted 9 lines · Mike Murphy
Current mainline (5.14), source file:
security/keys/key.cline 144:
key->serial>>= 1; /* negative numbers are not permitted */where serial is
int32_t. >> 1 is not converting negative to
positive. It is making a smaller negative value.
Sure, but the loop will go around again if it is < 3 anyways. I guess it is really doing useless work in that case and should just be completely removed.
--Ben