TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Finding bugs in Tarsnap

66 pointsby rubikscubealmost 10 years ago

5 comments

cpercivaalmost 10 years ago
<i>In LibreSSL, we went big hammer and clear all the bignums, regardless of sensitivity. And so it was that when I bumped into Colin at BSDCan 2014 two weeks later, failure to clear secret bignums from memory was fresh in my mind.</i><p>I bumped into Ted again three weeks ago at BSDCan 2015 and he must have had memory leaks on his mind, because the day after the conference ended he sent me an email pointing out a memory leak in Tarsnap. (Harmless, since it&#x27;s in a we&#x27;re-about-to-exit error path, but worth $10 anyway.)
评论 #9821839 未加载
derekp7almost 10 years ago
So does anyone know of a good list of &quot;worst practices&quot; when coding in C? Basically usage that results in undefined behavior which can come back to bite you when run on another architecture?<p>For example, doing a strcpy(dest, dest + 1) will work in most cases, but if done on 64-bit Linux with a CPU that has sse4 optimizations, you will get random corruption on certain string lengths. (The C standard says that the behavior in this case is undefined). I&#x27;d like to see a list of items such as this to watch out for when auditing code.
评论 #9821022 未加载
评论 #9822969 未加载
评论 #9821828 未加载
评论 #9823999 未加载
评论 #9820948 未加载
thualmost 10 years ago
When I was working for OpenERP, I thought it was surely possible for a user of one database to access other databases (when OpenERP run in multi-tenant mode, which was the case of the official OpenERP SaaS offer) by poking around the connection pool. And indeed in less than an hour I found a way to connect to any database. The fact that you can quickly find bugs when you have an idea of what you can look for is quite scary.
评论 #9822610 未加载
tokenrovealmost 10 years ago
One of the better ways to find bugs in other software is to first encounter them in your own. (Even if the bugs, as mentioned in this article, aren&#x27;t actually severe.)<p>In particular, I remember, while writing an ASN.1 library, commenting to a friend that &quot;most ASN.1 implementations are probably full of dangerous bugs&quot; (since mine certainly was), and about a year or two later all those ASN.1-related vulnerabilities came out.<p>I guess that in general, bugs appear in patterns that recur again and again in independent code, as people try to solve the same problems with the same tools and make the same assumptions.
Flowdalicalmost 10 years ago
&gt; tarsnap had a signal handler that was reading from a constant array. So what, how could this matter? The standard says thou shalt not.<p>An references to the standard (I assume he is referring to POSIX) where this is disallowed?
评论 #9824362 未加载