Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): update dependency @openzeppelin/contracts to v4.9.6 [security] - autoclosed #110

Closed

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Apr 17, 2023

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
@openzeppelin/contracts (source) 4.9.0 -> 4.9.6 age adoption passing confidence

GitHub Vulnerability Alerts

CVE-2023-34234

Impact

By frontrunning the creation of a proposal, an attacker can become the proposer and gain the ability to cancel it. The attacker can do this repeatedly to try to prevent a proposal from being proposed at all.

This impacts the Governor contract in v4.9.0 only, and the GovernorCompatibilityBravo contract since v4.3.0.

Patches

The problem has been patched in 4.9.1 by introducing opt-in frontrunning protection.

Workarounds

Submit the proposal creation transaction to an endpoint with frontrunning protection.

Credit

Reported by Lior Abadi and Joaquin Pereyra from Coinspect.

References

https://www.coinspect.com/openzeppelin-governor-dos/

CVE-2023-34459

Impact

When the verifyMultiProof, verifyMultiProofCalldata, processMultiProof, or processMultiProofCalldata functions are in use, it is possible to construct merkle trees that allow forging a valid multiproof for an arbitrary set of leaves.

A contract may be vulnerable if it uses multiproofs for verification and the merkle tree that is processed includes a node with value 0 at depth 1 (just under the root). This could happen inadvertently for balanced trees with 3 leaves or less, if the leaves are not hashed. This could happen deliberately if a malicious tree builder includes such a node in the tree.

A contract is not vulnerable if it uses single-leaf proving (verify, verifyCalldata, processProof, or processProofCalldata), or if it uses multiproofs with a known tree that has hashed leaves. Standard merkle trees produced or validated with the @​openzeppelin/merkle-tree library are safe.

Patches

The problem has been patched in 4.9.2.

Workarounds

If you are using multiproofs: When constructing merkle trees hash the leaves and do not insert empty nodes in your trees. Using the @​openzeppelin/merkle-tree package eliminates this issue. Do not accept user-provided merkle roots without reconstructing at least the first level of the tree. Verify the merkle tree structure by reconstructing it from the leaves.

CVE-2023-40014

Impact

OpenZeppelin Contracts is a library for secure smart contract development. Starting in version 4.0.0 and prior to version 4.9.3, contracts using ERC2771Context along with a custom trusted forwarder may see _msgSender return address(0) in calls that originate from the forwarder with calldata shorter than 20 bytes. This combination of circumstances does not appear to be common, in particular it is not the case for MinimalForwarder from OpenZeppelin Contracts, or any deployed forwarder the team is aware of, given that the signer address is appended to all calls that originate from these forwarders.

Patches

The problem has been patched in v4.9.3.

CVE-2024-27094

Impact

The Base64.encode function encodes a bytes input by iterating over it in chunks of 3 bytes. When this input is not a multiple of 3, the last iteration may read parts of the memory that are beyond the input buffer.

Although the encode function pads the output for these cases, up to 4 bits of data are kept between the encoding and padding, corrupting the output if these bits were dirty (i.e. memory after the input is not 0). These conditions are more frequent in the following scenarios:

  • A bytes memory struct is allocated just after the input and the first bytes of it are non-zero.
  • The memory pointer is set to a non-empty memory location before allocating the input.

Developers should evaluate whether the extra bits can be maliciously manipulated by an attacker.

Patches

Upgrade to 5.0.2 or 4.9.6.

References

This issue was reported by the Independent Security Researcher Riley Holterhus through Immunefi (@​rileyholterhus on X)


Release Notes

OpenZeppelin/openzeppelin-contracts (@​openzeppelin/contracts)

v4.9.6

Compare Source

  • Base64: Fix issue where dirty memory located just after the input buffer is affecting the result. (#​4929)

v4.9.5

Compare Source

  • Multicall: Make aware of non-canonical context (i.e. msg.sender is not _msgSender()), allowing compatibility with ERC2771Context. Patch duplicated Address.functionDelegateCall in v4.9.4 (removed).

v4.9.4

Compare Source

  • ERC2771Context and Context: Introduce a _contextPrefixLength() getter, used to trim extra information appended to msg.data.
  • Multicall: Make aware of non-canonical context (i.e. msg.sender is not _msgSender()), allowing compatibility with ERC2771Context.

v4.9.3

Compare Source

Note
This release contains a fix for GHSA-g4vp-m682-qqmp.

  • ERC2771Context: Return the forwarder address whenever the msg.data of a call originating from a trusted forwarder is not long enough to contain the request signer address (i.e. msg.data.length is less than 20 bytes), as specified by ERC-2771. (#​4481)
  • ERC2771Context: Prevent revert in _msgData() when a call originating from a trusted forwarder is not long enough to contain the request signer address (i.e. msg.data.length is less than 20 bytes). Return the full calldata in that case. (#​4484)

v4.9.2

Compare Source

  • MerkleProof: Fix a bug in processMultiProof and processMultiProofCalldata that allows proving arbitrary leaves if the tree contains a node with value 0 at depth 1.

v4.9.1

Compare Source

  • Governor: Add a mechanism to restrict the address of the proposer using a suffix in the description.

Configuration

📅 Schedule: Branch creation - "" (UTC), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot force-pushed the renovate/npm-@openzeppelin/contracts-vulnerability branch 5 times, most recently from 4931059 to 23ddf1e Compare April 28, 2023 05:18
@renovate renovate bot force-pushed the renovate/npm-@openzeppelin/contracts-vulnerability branch from 23ddf1e to 655650c Compare May 6, 2023 09:06
@renovate renovate bot force-pushed the renovate/npm-@openzeppelin/contracts-vulnerability branch 3 times, most recently from f3e6194 to 3032629 Compare May 19, 2023 11:14
@renovate renovate bot force-pushed the renovate/npm-@openzeppelin/contracts-vulnerability branch 2 times, most recently from 44a3a6a to a70272d Compare June 4, 2023 23:13
@iavl iavl enabled auto-merge June 5, 2023 00:02
@renovate renovate bot changed the title chore(deps): update dependency @openzeppelin/contracts to v4.8.3 [security] chore(deps): update dependency @openzeppelin/contracts to v4.8.3 [security] - autoclosed Jun 5, 2023
@renovate renovate bot closed this Jun 5, 2023
auto-merge was automatically disabled June 5, 2023 00:02

Pull request was closed

@renovate renovate bot deleted the renovate/npm-@openzeppelin/contracts-vulnerability branch June 5, 2023 00:02
@renovate renovate bot changed the title chore(deps): update dependency @openzeppelin/contracts to v4.8.3 [security] - autoclosed chore(deps): update dependency @openzeppelin/contracts to v4.8.3 [security] Jun 8, 2023
@renovate renovate bot reopened this Jun 8, 2023
@renovate renovate bot changed the title chore(deps): update dependency @openzeppelin/contracts to v4.8.3 [security] chore(deps): update dependency @openzeppelin/contracts to v4.9.1 [security] Jun 8, 2023
@renovate renovate bot force-pushed the renovate/npm-@openzeppelin/contracts-vulnerability branch 3 times, most recently from c786ec3 to 763a0e1 Compare June 9, 2023 06:27
@renovate renovate bot force-pushed the renovate/npm-@openzeppelin/contracts-vulnerability branch 2 times, most recently from ec93a75 to 45807d4 Compare June 16, 2023 06:42
@renovate renovate bot changed the title chore(deps): update dependency @openzeppelin/contracts to v4.9.1 [security] chore(deps): update dependency @openzeppelin/contracts to v4.9.2 [security] Jun 19, 2023
@renovate renovate bot force-pushed the renovate/npm-@openzeppelin/contracts-vulnerability branch 4 times, most recently from c49b4b3 to 46e6bdb Compare June 26, 2023 03:00
@renovate renovate bot force-pushed the renovate/npm-@openzeppelin/contracts-vulnerability branch 6 times, most recently from 9526063 to c3861b1 Compare August 24, 2023 13:29
@renovate renovate bot force-pushed the renovate/npm-@openzeppelin/contracts-vulnerability branch 6 times, most recently from afceaaf to 7fa1199 Compare August 31, 2023 17:46
@renovate renovate bot force-pushed the renovate/npm-@openzeppelin/contracts-vulnerability branch 4 times, most recently from 14cf7e4 to 62ea20a Compare September 12, 2023 01:47
@renovate renovate bot force-pushed the renovate/npm-@openzeppelin/contracts-vulnerability branch 4 times, most recently from 5341188 to 57cd131 Compare September 28, 2023 07:48
@renovate renovate bot force-pushed the renovate/npm-@openzeppelin/contracts-vulnerability branch 5 times, most recently from 65bb01e to 9b12808 Compare October 22, 2023 03:17
@renovate renovate bot changed the title chore(deps): update dependency @openzeppelin/contracts to v4.9.3 [security] chore(deps): update dependency @openzeppelin/contracts to v4.9.6 [security] Feb 29, 2024
@renovate renovate bot force-pushed the renovate/npm-@openzeppelin/contracts-vulnerability branch from 9b12808 to cac3908 Compare February 29, 2024 20:40
@renovate renovate bot changed the title chore(deps): update dependency @openzeppelin/contracts to v4.9.6 [security] chore(deps): update dependency @openzeppelin/contracts to v4.9.6 [security] - autoclosed Aug 6, 2024
@renovate renovate bot closed this Aug 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant