flak rss random

yet another introduction to yacc

One of the great tools in the unix toolbox is yacc. Regrettably, the documentation can be somewhat weak. The OpenBSD man page covers command line options, but doesn’t even provide a reference to the grammar of the input file. For that, one must read Stephen Johnson’s paper, Yacc: Yet Another Compiler-Compiler. It’s pretty good, and there’s some other tutorials out there, but perhaps it’s worth highlighting a few tips and tricks.

more...

Posted 30 Aug 2017 17:20 by tedu Updated: 30 Aug 2017 17:20
Tagged: openbsd programming

books chapter nine

From card loaders to virtual servers.

more...

Posted 18 Aug 2017 17:13 by tedu Updated: 18 Aug 2017 17:13
Tagged: bookreview

books chapter eight

Smaller is better.

more...

Posted 12 Aug 2017 21:01 by tedu Updated: 12 Aug 2017 21:01
Tagged: bookreview

a repo upon the deep

In reference to arbitrary code execution in various source control programs. Refer svn advisory. Remember A Fire Upon the Deep?

There’s some code archaeologists who dig up an artifact. They don’t know what it does, but it includes some instructions for how to unpack it. And so they follow the instructions. And they think they’re taking precautions to prevent it from doing bad stuff, but they screw up, and the evil AI is turned loose. And then bad stuff happens.

It’s funny how similar this is to today’s vulnerability. In theory, checking out a code repo should be a safe operation. All you’re doing is downloading some artifact from a server. Building the code, running the code, all that can be unsafe. But surely there’s no trouble to simply checking out some code?

Alas, a repo is not just a repo. Checking out a repo might require checking out other sub repos and external resources. And so a dumb read only artifact is actually a smart read/execute artifact. The artifact can’t be checked out without also interpreting some of its contents. And if interpreting happens to execute some unwanted shell commands... Bad stuff happens.

It’s a bug, and it’s fixed, but another lesson that nothing is ever simple when adding features. What looks like just a hostname over here could be interpreted as a shell command over there.

Posted 10 Aug 2017 19:38 by tedu Updated: 10 Aug 2017 19:38
Tagged: security software

openbsd changes of note 626

Hackerthon is imminent.

There are two signals one can receive after accessing invalid memory, SIGBUS and SIGSEGV. Nobody seems to know what the difference is or should be, although some theories have been unearthed. Make some attempt to be slightly more consistent and predictable in OpenBSD.

Introduces jiffies in an effort to appease our penguin oppressors.

Clarify that IP.OF.UPSTREAM.RESOLVER is not actually the hostname of a server you can use.

Switch acpibat to use _BIX before _BIF, which means you might see discharge cycle counts, too.

Assorted clang compatibility. clang uses -Oz to mean optimize for size and -Os for something else, so make gcc accept -Oz so all makefiles can be the same. Adjust some hardlinks. Make sure we build gcc with gcc.

The SSL_check_private_key function is a lie.

Switch the amd64 and i386 compiler to clang and see what happens.

We are moving towards using wscons (wstpad) as the driver for touchpads.

Dancing with the stars, er, NET_LOCK().

clang emits lots of warnings. Fix some of them. Turn off a bunch of clang builtins because we have a strong preference that code use our libc versions. Some other changes because clang is not gcc.

Among other curiosities, static variables in the special .openbsd.randomdata are sometimes assumed to be all zero, leading the clang optimizer to eliminate reads of such variables.

Some more pledge rules for sed. If the script doesn’t require opening new files, don’t let it.

Backport a bajillion fixes to stable. Release errata.

RFC 1885 was obsoleted nearly 20 years ago by RFC 2463 which was obsoleted over 10 years ago by RFC 4443. We are probably not going back.

Update libexpat to 2.2.3.

vmm: support more than 3855MB guest memory.

Merge libdrm 2.4.82.

Disable SSE optimizations on i386/amd64 for SlowBcopy. It is supposed to be slow. Prevents crashes when talking to memory mapped video memory in a hypervisor.

Posted 08 Aug 2017 21:59 by tedu Updated: 08 Aug 2017 21:59
Tagged: openbsd

books chapter seven

Lucky sevens.

more...

Posted 05 Aug 2017 19:37 by tedu Updated: 05 Aug 2017 19:37
Tagged: bookreview

books chapter six

Making some headway.

more...

Posted 28 Jul 2017 16:45 by tedu Updated: 28 Jul 2017 16:45
Tagged: bookreview

hurray we won

A few thoughts after reading Are all BSDs created equally? by Ilja van Sprundel. Theo says OpenBSD is the best, Ilja fact checks.

more...

Posted 28 Jul 2017 02:17 by tedu Updated: 28 Jul 2017 02:17
Tagged: openbsd security software thoughts

life off the chain

A few notes about gathered experiences with https certs not part of the traditional chain.

more...

Posted 27 Jul 2017 18:54 by tedu Updated: 27 Jul 2017 18:54
Tagged: software web

light screens vs dark screens

How best to use a computer at night?

more...

Posted 27 Jul 2017 18:54 by tedu Updated: 10 Aug 2017 15:12
Tagged: computers software