Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'v6.17-p3' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6

Pull crypto fixes from Herbert Xu:
"This fixes a NULL pointer dereference in ccp and a couple of bugs in
the af_alg interface"

* tag 'v6.17-p3' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
crypto: af_alg - Disallow concurrent writes in af_alg_sendmsg
crypto: af_alg - Set merge to zero early in af_alg_sendmsg
crypto: ccp - Always pass in an error pointer to __sev_platform_shutdown_locked()

+16 -6
+9 -1
crypto/af_alg.c
··· 970 970 } 971 971 972 972 lock_sock(sk); 973 + if (ctx->write) { 974 + release_sock(sk); 975 + return -EBUSY; 976 + } 977 + ctx->write = true; 978 + 973 979 if (ctx->init && !ctx->more) { 974 980 if (ctx->used) { 975 981 err = -EINVAL; ··· 1025 1019 continue; 1026 1020 } 1027 1021 1022 + ctx->merge = 0; 1023 + 1028 1024 if (!af_alg_writable(sk)) { 1029 1025 err = af_alg_wait_for_wmem(sk, msg->msg_flags); 1030 1026 if (err) ··· 1066 1058 ctx->used += plen; 1067 1059 copied += plen; 1068 1060 size -= plen; 1069 - ctx->merge = 0; 1070 1061 } else { 1071 1062 do { 1072 1063 struct page *pg; ··· 1111 1104 1112 1105 unlock: 1113 1106 af_alg_data_wakeup(sk); 1107 + ctx->write = false; 1114 1108 release_sock(sk); 1115 1109 1116 1110 return copied ?: err;
+1 -1
drivers/crypto/ccp/sev-dev.c
··· 2430 2430 { 2431 2431 int error; 2432 2432 2433 - __sev_platform_shutdown_locked(NULL); 2433 + __sev_platform_shutdown_locked(&error); 2434 2434 2435 2435 if (sev_es_tmr) { 2436 2436 /*
+6 -4
include/crypto/if_alg.h
··· 135 135 * SG? 136 136 * @enc: Cryptographic operation to be performed when 137 137 * recvmsg is invoked. 138 + * @write: True if we are in the middle of a write. 138 139 * @init: True if metadata has been sent. 139 140 * @len: Length of memory allocated for this data structure. 140 141 * @inflight: Non-zero when AIO requests are in flight. ··· 152 151 size_t used; 153 152 atomic_t rcvused; 154 153 155 - bool more; 156 - bool merge; 157 - bool enc; 158 - bool init; 154 + u32 more:1, 155 + merge:1, 156 + enc:1, 157 + write:1, 158 + init:1; 159 159 160 160 unsigned int len; 161 161