mbox series

[GIT,PULL] fsverity fix for 5.15-rc4

Message ID YVK0jzJ/lt97xowQ@sol.localdomain (mailing list archive)
State Accepted
Headers show
Series [GIT,PULL] fsverity fix for 5.15-rc4 | expand

Pull-request

https://git.kernel.org/pub/scm/fs/fscrypt/fscrypt.git tags/fsverity-for-linus

Message

Eric Biggers Sept. 28, 2021, 6:22 a.m. UTC
The following changes since commit e4e737bb5c170df6135a127739a9e6148ee3da82:

  Linux 5.15-rc2 (2021-09-19 17:28:22 -0700)

are available in the Git repository at:

  https://git.kernel.org/pub/scm/fs/fscrypt/fscrypt.git tags/fsverity-for-linus

for you to fetch changes up to 80f6e3080bfcf865062a926817b3ca6c4a137a57:

  fs-verity: fix signed integer overflow with i_size near S64_MAX (2021-09-22 10:56:34 -0700)

----------------------------------------------------------------

Fix an integer overflow when computing the Merkle tree layout of
extremely large files, exposed by btrfs adding support for fs-verity.

----------------------------------------------------------------
Eric Biggers (1):
      fs-verity: fix signed integer overflow with i_size near S64_MAX

 fs/verity/enable.c | 2 +-
 fs/verity/open.c   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Comments

Linus Torvalds Sept. 28, 2021, 2:59 p.m. UTC | #1
On Mon, Sep 27, 2021 at 11:22 PM Eric Biggers <ebiggers@kernel.org> wrote:
>
> Fix an integer overflow when computing the Merkle tree layout of
> extremely large files, exposed by btrfs adding support for fs-verity.

I wonder if 'i_size' should be u64. I'm not convinced people think
about 'loff_t' being signed - but while that's required for negative
lseek() offsets, I'm not sure it makes tons of sense for an inode
size.

Same goes for f_pos, for that matter.

But who knows what games people have played with magic numbers (ie
"-1") internally, or where they _want_ signed compares. So it's
certainly not some obvious trivial fix.

Pulled.

            Linus
pr-tracker-bot@kernel.org Sept. 28, 2021, 3:01 p.m. UTC | #2
The pull request you sent on Mon, 27 Sep 2021 23:22:07 -0700:

> https://git.kernel.org/pub/scm/fs/fscrypt/fscrypt.git tags/fsverity-for-linus

has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/6fd3ec5c7af58d5d6b598fba22ac387645af33f4

Thank you!