<feed xmlns='http://www.w3.org/2005/Atom'>
<title>wireguard-openbsd/lib/libc/stdio, branch master</title>
<subtitle>WireGuard implementation for the OpenBSD kernel</subtitle>
<id>https://git.zx2c4.com/wireguard-openbsd/atom/lib/libc/stdio?h=master</id>
<link rel='self' href='https://git.zx2c4.com/wireguard-openbsd/atom/lib/libc/stdio?h=master'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/'/>
<updated>2021-04-01T14:27:47Z</updated>
<entry>
<title>For the snprintf range check demo, add a (size_t) cast in the right place</title>
<updated>2021-04-01T14:27:47Z</updated>
<author>
<name>deraadt</name>
<email>deraadt@openbsd.org</email>
</author>
<published>2021-04-01T14:27:47Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=4af6ccb13c0b15884de7ae705671083a7b06d335'/>
<id>urn:sha1:4af6ccb13c0b15884de7ae705671083a7b06d335</id>
<content type='text'>
which will satisfy the toughest compiler options
</content>
</entry>
<entry>
<title>article fixes; from eddie youseph</title>
<updated>2021-02-02T07:33:29Z</updated>
<author>
<name>jmc</name>
<email>jmc@openbsd.org</email>
</author>
<published>2021-02-02T07:33:29Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=c1d0308a693828b31d436726f1e24f9a9741b4ac'/>
<id>urn:sha1:c1d0308a693828b31d436726f1e24f9a9741b4ac</id>
<content type='text'>
</content>
</entry>
<entry>
<title>The printf format string component %n is a nearly turning-complete gadget.</title>
<updated>2020-10-27T21:06:57Z</updated>
<author>
<name>deraadt</name>
<email>deraadt@openbsd.org</email>
</author>
<published>2020-10-27T21:06:57Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=cd45c0a61756abdf73ec21d4f2e41d9144f129b6'/>
<id>urn:sha1:cd45c0a61756abdf73ec21d4f2e41d9144f129b6</id>
<content type='text'>
Largely considered attack surface nowadays.  The benefit provided by %n
is completely overshadowed by the risk.

New uses of %n don't seem to be entering the C ecosystem, as static
tools flag them.  And everyone points fingers at those people....

The list of programs (and libraries) which use %n is therefore finite
and shrinking.  Most of the %n use comes out of the GNU ecosystem.
jca@ has convinced gnulib to fix their code (so we need to wait for
software including gnulib to make new releases).

A few libraries have moved ahead of us and become more strict.  Some n
longer permit %n (for instance, andriod bionic). Others log the occurance.
Some log and abort if the output location is W|X (MacOS).

Our base tree is clean.  The ports tree contains a handful during
build time, and unknown count (more) during runtime.

We would like to abort programs on any occurance of %n.  Or we could
be like MacOS, aborting for W|X pages (but would need a system call
which can check that condition, and that introduces addressspace
knowledge we don't want attackers to know, and may be a poor tradeoff).

For now, we can syslog, to increase awareness, and involve more people
in the greater community to remove %n uses.

[If %n is at the end, use the *printf return value.  If it occurs in
the middle, split the printf calls into multiples]

Hopefully one day, we can just abort() when %n happens.  Help us get
there?

ok jca, plus naddy for ports team
</content>
</entry>
<entry>
<title>Spell out n as en for consistency with other parts of the page.</title>
<updated>2020-09-13T12:58:08Z</updated>
<author>
<name>tb</name>
<email>tb@openbsd.org</email>
</author>
<published>2020-09-13T12:58:08Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=253b110478f75e318d7f2390fa51e13ada5c85d3'/>
<id>urn:sha1:253b110478f75e318d7f2390fa51e13ada5c85d3</id>
<content type='text'>
</content>
</entry>
<entry>
<title>%lln is percent ell ell n (not dee).</title>
<updated>2020-09-13T11:55:53Z</updated>
<author>
<name>claudio</name>
<email>claudio@openbsd.org</email>
</author>
<published>2020-09-13T11:55:53Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=e15c5ff1aee02a98934fd1d41fd19e6698758994'/>
<id>urn:sha1:e15c5ff1aee02a98934fd1d41fd19e6698758994</id>
<content type='text'>
OK deraadt@
</content>
</entry>
<entry>
<title>Fix append mode so it always writes to the end and expand regress.</title>
<updated>2020-08-17T16:17:39Z</updated>
<author>
<name>millert</name>
<email>millert@openbsd.org</email>
</author>
<published>2020-08-17T16:17:39Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=d35e2a8f3fb7a08e8e9807b48cdfb1e897d73641'/>
<id>urn:sha1:d35e2a8f3fb7a08e8e9807b48cdfb1e897d73641</id>
<content type='text'>
OK deraadt@ martijn@
</content>
</entry>
<entry>
<title>Fix handling of "w+" mode, we were only truncating for "w".</title>
<updated>2020-08-14T12:00:33Z</updated>
<author>
<name>millert</name>
<email>millert@openbsd.org</email>
</author>
<published>2020-08-14T12:00:33Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=ac593df8eb280317c6c3cf3013e2b2f08f75bb18'/>
<id>urn:sha1:ac593df8eb280317c6c3cf3013e2b2f08f75bb18</id>
<content type='text'>
OK martijn@ mpi@
</content>
</entry>
<entry>
<title>adjust %n description to vaguely say "pointer", becuase the following</title>
<updated>2020-07-10T17:04:18Z</updated>
<author>
<name>deraadt</name>
<email>deraadt@openbsd.org</email>
</author>
<published>2020-07-10T17:04:18Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=fc72f1bd953fd972e97f29fcde7eea07c3a5550a'/>
<id>urn:sha1:fc72f1bd953fd972e97f29fcde7eea07c3a5550a</id>
<content type='text'>
list of "[size]n" includes "n" on it's own, thereby the "int" case is
described correctly.
ok schwarze
</content>
</entry>
<entry>
<title>As suggested by deraadt@, rewrite most of the printf(3) manual page</title>
<updated>2020-07-10T14:43:18Z</updated>
<author>
<name>schwarze</name>
<email>schwarze@openbsd.org</email>
</author>
<published>2020-07-10T14:43:18Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=84fb3e49dc326f9c662b215011e0b21895666ecc'/>
<id>urn:sha1:84fb3e49dc326f9c662b215011e0b21895666ecc</id>
<content type='text'>
to properly show the (differing) syntaxes of all the conversion
specifications, and reduce the amount of forward references from
the list of modifiers to the list of specifiers.

While here, properly explain %lc and %ls.
Also correct RETURN VALUES, which incorrectly talked about
counting characters while actually bytes are counted.

Using feedback from millert@, deraadt@, tb@, and Martin Vahlensieck.
OK deraadt@, millert@, and tb@ on intermediate versions of this diff
and no objections from jmc@.
</content>
</entry>
<entry>
<title>Minor tweaks in the description of %g:</title>
<updated>2020-07-06T17:24:59Z</updated>
<author>
<name>schwarze</name>
<email>schwarze@openbsd.org</email>
</author>
<published>2020-07-06T17:24:59Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=e571446a95083129733d5660e73f71944a5ef2f5'/>
<id>urn:sha1:e571446a95083129733d5660e73f71944a5ef2f5</id>
<content type='text'>
1. Clarify that %G uses %F, not %f; noticed by millert@.
2. Mention that %g originally meant "general notation", see:
https://minnie.tuhs.org/cgi-bin/utree.pl?file=V7/usr/src/libc/stdio/doprnt.s
Triggered by a somewhat different patch from Ian &lt;ropers at gmail dot com&gt;.
Feedback and OK millert@ and jmc@.
</content>
</entry>
</feed>
