Skip to content

Avoid overflow in addition when checking counterparty feerates #1282

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

Merged

Conversation

TheBlueMatt
Copy link
Collaborator

This is harmless outside of debug builds - the feerate will
overflow causing it to either spuriously fail the first check, or
correctly pass it and fail the second check. In debug builds,
however, it panics due to integer overflow.

Found by the full_stack_target fuzz test in the
Chaincode-provided continuous fuzzing. Thanks Chaincode!

This is harmless outside of debug builds - the feerate will
overflow causing it to either spuriously fail the first check, or
correctly pass it and fail the second check. In debug builds,
however, it panics due to integer overflow.

Found by the `full_stack_target` fuzz test in the
Chaincode-provided continuous fuzzing. Thanks Chaincode!
@codecov-commenter
Copy link

codecov-commenter commented Jan 26, 2022

Codecov Report

Merging #1282 (b54fe5f) into main (35d4ebb) will increase coverage by 0.51%.
The diff coverage is 91.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1282      +/-   ##
==========================================
+ Coverage   90.40%   90.91%   +0.51%     
==========================================
  Files          71       71              
  Lines       38135    39876    +1741     
==========================================
+ Hits        34476    36254    +1778     
+ Misses       3659     3622      -37     
Impacted Files Coverage Δ
lightning/src/ln/channel.rs 93.39% <91.66%> (+4.04%) ⬆️
lightning/src/ln/functional_tests.rs 97.32% <0.00%> (-0.05%) ⬇️
lightning/src/chain/keysinterface.rs 97.63% <0.00%> (+1.81%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 35d4ebb...b54fe5f. Read the comment docs.

Copy link
Contributor

@jkczyz jkczyz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK b54fe5f

@valentinewallace valentinewallace merged commit 482a2b9 into lightningdevkit:main Jan 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants