- Notifications
You must be signed in to change notification settings - Fork910
Commitf72711c
committed
Add a custom copy handler for AES key wrap
This is necessary because ctx->cipher_data is an EVP_AES_WRAP_CTXcontaining a pointer to ctx->iv. EVP_CIPHER_CTX_copy() uses memcpyto copy cipher_data to the target struct. The result is that thecopy contains a pointer to the wrong struct, which then leads to ause-after-free. The custom copy handler fixes things up to avoidthat.Issue reported by Guido Vrankenok beck inoguchi jsing1 parent22c2c18 commitf72711c
1 file changed
+31
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
1636 | 1636 | | |
1637 | 1637 | | |
1638 | 1638 | | |
| 1639 | + | |
| 1640 | + | |
| 1641 | + | |
| 1642 | + | |
| 1643 | + | |
| 1644 | + | |
| 1645 | + | |
| 1646 | + | |
| 1647 | + | |
| 1648 | + | |
| 1649 | + | |
| 1650 | + | |
| 1651 | + | |
| 1652 | + | |
| 1653 | + | |
| 1654 | + | |
| 1655 | + | |
| 1656 | + | |
| 1657 | + | |
| 1658 | + | |
| 1659 | + | |
| 1660 | + | |
| 1661 | + | |
| 1662 | + | |
| 1663 | + | |
1639 | 1664 | | |
1640 | 1665 | | |
1641 | | - | |
| 1666 | + | |
| 1667 | + | |
1642 | 1668 | | |
1643 | 1669 | | |
1644 | 1670 | | |
| |||
1652 | 1678 | | |
1653 | 1679 | | |
1654 | 1680 | | |
1655 | | - | |
| 1681 | + | |
1656 | 1682 | | |
1657 | 1683 | | |
1658 | 1684 | | |
| |||
1674 | 1700 | | |
1675 | 1701 | | |
1676 | 1702 | | |
1677 | | - | |
| 1703 | + | |
1678 | 1704 | | |
1679 | 1705 | | |
1680 | 1706 | | |
| |||
1696 | 1722 | | |
1697 | 1723 | | |
1698 | 1724 | | |
1699 | | - | |
| 1725 | + | |
1700 | 1726 | | |
1701 | 1727 | | |
1702 | 1728 | | |
| |||
0 commit comments
Comments
(0)