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

stefanberger / swtpm / 3815
74%
master: 74%

Build:
Build:
LAST BUILD BRANCH: HEAD
DEFAULT BRANCH: master
Ran 07 Apr 2022 01:35AM UTC
Jobs 1
Files 70
Run time 5s
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
3815

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>

5456 of 7326 relevant lines covered (74.47%)

16610.87 hits per line

Jobs
ID Job ID Ran Files Coverage
2 3815.2 (COVERITY_SCAN_TOKEN=[secure] PREFIX="/usr" CONFIG="--with-openssl --prefix=/usr --enable-test-coverage" SUDO="sudo" CHECK="check" SWTPM_TEST_IBMTSS2="1" SWTPM_TEST_STORE_VOLATILE="1") 07 Apr 2022 01:35AM UTC 0
74.47
Travis Job 3815.2
Source Files on build 3815
Detailed source file information is not available for this build.
  • Back to Repo
  • Build #3815
  • 208a30a0 on github
  • Prev Build on stable-0.6 (#3806)
  • Next Build on stable-0.6 (#3822)
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