Commit 789a7fc6 authored by Tiffany Yang's avatar Tiffany Yang
Browse files

ANDROID: crypto: af_alg - Fix assignment from bitfield



A recent security patch in af_alg changed converted bool members of
af_alg_ctx into bitfields. Update assignment to the bitfield to prevent
the following kernelci error:

crypto/af_alg.c: In function ‘af_alg_sendpage’:
crypto/af_alg.c:1033:21: error: overflow in conversion from ‘int’ to ‘unsigned char:1’ changes value from ‘flags & 32768’ to ‘0’ [-Werror=overflow]
 1033 |         ctx->more = flags & MSG_MORE;
      |                     ^~~~~
This line is no longer present in upstream as of commit dc97391e
("sock: Remove ->sendpage*() in favour of sendmsg(MSG_SPLICE_PAGES)"),
which was introduced after 6.1.

Bug: 454240277
Fixes: 3522ea72 ("UPSTREAM: crypto: af_alg - Disallow concurrent writes in af_alg_sendmsg")
Change-Id: I5f1a944aeb44eb7a9b181924ef8b82fe79771353
Signed-off-by: default avatarTiffany Yang <ynaffit@google.com>
parent 0f099d61
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment