• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

stefanberger / swtpm / 4154
74%
master: 74%

Build:
Build:
LAST BUILD BRANCH: HEAD
DEFAULT BRANCH: master
Ran 25 Nov 2022 12:31AM UTC
Jobs 1
Files 56
Run time 1s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
4154

cron

travis-ci-com

stefanberger
swtpm: Use uint64_t in tlv_data_append() to avoid integer overflows

Instead of uint32_t use uint64_t's for accumulating needed buffer sizes
that are calculated by adding uint32_t length indicators. Use the uint64_t
to check for excessively large buffer sizes that could cause an integer
overflow if uint32_t was used.

This patch addresses the case where a user passes an old version of TPM
state file to swtpm for reading and the file is 4GB in size and thus can
cause an integer overflow in this particular function.

Otherwise, the previous fix to tlv_data_find_tag() protects swtpm from
integer overflows and later out-of-bound accesses when the TPM state is
initially read from a file (assuming the state file has a header, which
is the case since swtpm 0.1). If an excessively large buffer was passed
to libtpms, it would reject it since it would never be able to take in
that much data.

Data written to the file are coming from libtpms that we can trust in
terms of length indicators.

Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>

3734 of 5061 relevant lines covered (73.78%)

22794.84 hits per line

Jobs
ID Job ID Ran Files Coverage
2 4154.2 (COVERITY_SCAN_TOKEN=[secure] PREFIX="/usr" CONFIG="--with-openssl --prefix=/usr --enable-test-coverage" SUDO="sudo" CHECK="check" SWTPM_TEST_IBMTSS2="1") 25 Nov 2022 12:31AM UTC 0
73.78
Travis Job 4154.2
Source Files on build 4154
Detailed source file information is not available for this build.
  • Back to Repo
  • Build #4154
  • 20141486 on github
  • Prev Build on stable-0.5 (#4148)
  • Next Build on stable-0.5 (#4159)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc