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.8-p3' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6

Pull crypto fixes from Herbert Xu:
"Fix regressions in cbc and algif_hash, as well as an older
NULL-pointer dereference in ccp"

* tag 'v6.8-p3' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
crypto: algif_hash - Remove bogus SGL free on zero-length error path
crypto: cbc - Ensure statesize is zero
crypto: ccp - Fix null pointer dereference in __sev_platform_shutdown_locked

+14 -4
+3 -2
crypto/algif_hash.c
··· 91 91 if (!(msg->msg_flags & MSG_MORE)) { 92 92 err = hash_alloc_result(sk, ctx); 93 93 if (err) 94 - goto unlock_free; 94 + goto unlock_free_result; 95 95 ahash_request_set_crypt(&ctx->req, NULL, 96 96 ctx->result, 0); 97 97 err = crypto_wait_req(crypto_ahash_final(&ctx->req), 98 98 &ctx->wait); 99 99 if (err) 100 - goto unlock_free; 100 + goto unlock_free_result; 101 101 } 102 102 goto done_more; 103 103 } ··· 170 170 171 171 unlock_free: 172 172 af_alg_free_sg(&ctx->sgl); 173 + unlock_free_result: 173 174 hash_free_result(sk, ctx); 174 175 ctx->more = false; 175 176 goto unlock;
+3
crypto/cbc.c
··· 148 148 if (!is_power_of_2(inst->alg.co.base.cra_blocksize)) 149 149 goto out_free_inst; 150 150 151 + if (inst->alg.co.statesize) 152 + goto out_free_inst; 153 + 151 154 inst->alg.encrypt = crypto_cbc_encrypt; 152 155 inst->alg.decrypt = crypto_cbc_decrypt; 153 156
+8 -2
drivers/crypto/ccp/sev-dev.c
··· 534 534 535 535 static int __sev_platform_shutdown_locked(int *error) 536 536 { 537 - struct sev_device *sev = psp_master->sev_data; 537 + struct psp_device *psp = psp_master; 538 + struct sev_device *sev; 538 539 int ret; 539 540 540 - if (!sev || sev->state == SEV_STATE_UNINIT) 541 + if (!psp || !psp->sev_data) 542 + return 0; 543 + 544 + sev = psp->sev_data; 545 + 546 + if (sev->state == SEV_STATE_UNINIT) 541 547 return 0; 542 548 543 549 ret = __sev_do_cmd_locked(SEV_CMD_SHUTDOWN, NULL, error);