|
|
Log in / Subscribe / Register

LWN.net Weekly Edition for September 25, 2014

Reviving TTX and FontTools

By Nathan Willis
September 24, 2014

ATypI 2014

At ATypI 2014 in Barcelona, Google's Behdad Esfahbod gave a report on the work he has been doing to resurrect and reinvigorate the development of a long-dormant free-software project used for font manipulation. In addition to bug fixes and optimizations, he has added several new tools to the original set, and the code is now in use not only at Google, but by several third-party applications as well.

The project in question is known to most users as TTX/FontTools; FontTools is the name of the underlying Python library, while TTX is the most commonly used tool from the included suite of utilities. Esfahbod said he had been "working on a secret project" to revive FontTools for the past few years; he has now made the project public and is inviting users and contributors to get involved. Google started using it internally for font-production work in 2013, at which point he began adapting it and adding new features. His version is available on GitHub, and there is a discussion forum on Google Groups.

[Behdad Esfahbod at ATypI 2014]

By way of background, he outlined the history of FontTools. The project was started in 1999 by Just van Rossum, but in a few years work on it had slowed down to "maintenance mode." Development virtually ceased in 2004, although the code lived on at its SourceForge project page and has continued to be packaged by multiple Linux distributions. The better-known TTX component is a command-line utility that converts font files to XML and vice-versa, since editing and processing XML is considerably easier than performing the same tasks on binary OpenType files. FontTools is the library that powers TTX, he said, but it can do much, much more.

The usefulness of TTX comes from the fact that its XML representation is extremely close to the internal format of OpenType tables. Thus, it is easy to convert a font through TTX and back again, getting a stable, usable output font without losing any information. "I'll make a bet," he said, "no matter what you use to create a font, if you round trip it through TTX, it will be functionally the same." It can look inside of a font file and extract data that other tools cannot. In other words, he said, "it expresses what you want to do with a font much more compactly" than other tools do.

Practical matters

FontTools's XML compiler/decompiler functionality, Esfahbod said, can also be used to optimize fonts—reducing redundancies, for example. The XML it produces is also more compact than that of other conversion tools, so operations are quite fast—fast enough for batch operations on the hundreds of fonts used in the Google Fonts service, for example. In addition, FontTools works with both Python 2 and Python 3, it has no external dependencies, and it introduces minimal abstractions, making it simple to learn.

He then discussed a series of practical usage examples. FontTools can read Type 1, TrueType, and Compact Font Format (CFF) fonts (as well as several less-common formats). It can be used to quickly figure out what a font file includes, such as character coverage, hinting, ligatures, and kerning. That makes it possible to "diff" font versions in a meaningful way, as well as to analyze and generate reports (particularly on large batches of fonts). It can also be used as the final step in producing fonts—for example, adding name-table entries and hints, or even subsetting (such as generating a Japanese-only font file) and merging font files. As a library rather than a graphical application, he said, FontTools is also one of the only options for doing server-side manipulation or reporting tasks, and its XML serialization feature can turn binary font files into a version-control-friendly text representation.

Another major use case for FontTools is "hotfixing" fonts, he said. Converting to XML and back makes it easy to regularize glyph names, fix encoding problems, or add missing characters—for example, he said that Google uses FontTools to make sure that its fonts are not missing the non-breaking space character, which is easy to overlook. As font engineers, he said, there are a number of such things that type designers do not need to worry about, "but are fun for those of us who enjoy writing scripts."

New work

Initially, Esfahbod said, his work on FontTools involved implementing longstanding bug fixes and feature requests that had gone unaddressed in the SourceForge project. He then moved on to ensuring that the XML format was stable, that conversion produced predictable output, and to optimizing the output to be as compact as possible (which he said was vital for Google's web-font service). He then focused on speed improvements, telling the audience that "Python can be slow—if you're not careful about it."

Eventually, though, he began adding new features to the library, and ultimately new utilities as well. Among the highlights are support for Web Open Font Format (WOFF) files and many additional OpenType tables—including bitmap tables and all of the competing chromatic font formats: SVG glyphs and the various formats promoted by Google, Apple, and Microsoft.

There are three new utilities available, he said: pyftsubset, pyftmerge, and pyftinspect. pyftsubset is for generating a subset of an existing font—only certain character blocks, for example, or even a minimal set of glyphs for use in a particular document. It supports both TrueType and CFF glyphs, and it optimizes file output size. pyftmerge is the opposite; it combines multiple fonts into a single file. At the moment it is a "very early prototype," he said, supporting just TrueType. It includes logic to handle conflicting characters and hinting, but in a naive manner at the moment: it preserves the contents of the first input file given. pyftinspect is a previewer, showing the font's table contents in a pop-up window.

In addition to Google Fonts, Esfahbod said that there were already several other users of his relaunched FontTools code. They include several font foundries, Adobe's AFDKO, the free-software font build-service tool Font Bakery, and even Adam Twardoch, one of the main developers at the proprietary font-design-software company FontLab. There are many more features still on the to-do list, Esfahbod said, including support for more input formats, a "lint" tool, better merging options, and better optimization. He would also like to add entirely new functionality, such as the ability to convert between TrueType and CFF, and the ability to optimize TrueType outlines.

There is more work already in development. An intern has been working for the past few months on a CFF subroutiner (which reduces file size by eliminating redundancy) that is expected to be released as free software soon. Esfahbod is also working with a faculty and student team at the University of Waterloo on code to analyze TrueType's bytecode language.

Impact

The font-development community is heavily invested in Python; it is the preferred scripting interface to essentially all font-design applications. But there are relatively few projects that provide a reusable library. In fact, the only other such open-source library that implements a large feature set is Robofab, which is developed primarily to serve as the scripting interface to the commercial font editor Robofont. Nevertheless, there are a lot of small free-software utilities and scripts out there that use Robofab.

But FontTools and Robofab are not direct competitors; they serve two very different purposes. Robofab is a library for working on font design: glyph drawing, spacing, kerning, and so on. The primitives it defines are limited to what is required for these tasks (points, segments, contours, glyphs, etc), and it is designed to work with the Unified Font Object (UFO) drawing format. FontTools, on the other hand, is designed to operate on already built font files: .TTFs, .OTFs, .WOFFs, etc. Its abstractions are not about the drawing of letters and numerals, but about the (arguably) more tedious process of verifying and manipulating all of the tables and embedded features required to make a font work. The fact that it has survived in most major Linux distributions for a decade without real maintainership is a testament to the demand for such a library.

Esfahbod's report on FontTools was also interesting in light of Adobe's subsequent release of AFDKO as an open-source project. Both of these projects attest to the fact that the font-development community is quickly learning the value of sharing tools. Whereas in past years much of the "open source discussion" at ATypI and similar events was focused on the design of open-font licensing, this year open source was more prevalent in conversation—but in a more subtle fashion.

In fact, the first talk of the week was on the subject of what commercial font-makers can learn from open source, and was given by Thomas Phinney, who works at FontLab. He cited advantages that people already enmeshed in FOSS will find familiar: the value of collaboration, the freedom to specialize on certain tasks by not reinventing the wheel for every task, the benefit to everyone of sharing information, and so on. Open source is still only one of multiple development models within the industry, but it has never looked healthier.

Comments (1 posted)

A Dark Room

September 24, 2014

This article was contributed by Adam Saunders

It's not often that an independent, open-source video game receives widespread mainstream attention and acclaim — let alone a game as quirky as A Dark Room (ADR). The game is a minimalist text adventure that starts in the eponymous room and expands over time into something much greater. In a face-to-face conversation, ADR's developer Michael Townsend detailed the game's origins and development, which may interest those considering common web-development tools (HTML5, JavaScript, and CSS) for game design.

Gameplay begins in a starkly described room. Players will find that soon after they stoke the dark-and-freezing room's dead fire, "a ragged stranger stumbles through the door and collapses in the corner". The stranger's ability to construct buildings and tools provides an early means to grow the game's mechanics, which subtly, gradually, and uniquely paint a chilling portrayal of a post-apocalyptic science fiction world.

[Screen shot]

The evolution of the gameplay over time, combined with its focus on "ludonarrative cohesion" (the use of gameplay mechanics themselves to progress a story in a video game), would win the game critical praise. A front page post on Hacker News was followed with positive attention from popular sites like The New Yorker and Slate Magazine. ADR would reach the #1 spot on the US and UK iOS App Store download charts for a few months following a proprietary release for Apple's mobile devices.

In 2013, when working full-time at a consulting company, Townsend was inspired by the game Candy Box, which features some similar mechanics: a minimalist text-adventure game with ASCII art that has game mechanics that deepen gradually over time. He felt that this style of gameplay had untapped potential, so he worked on evenings and weekends for several weeks before releasing ADR in June 2013.

Soon after release, the game hit the front page of Hacker News, with several positive comments from software developers who found themselves hooked on the game. A few weeks later, Townsend announced a formal open source release under the Mozilla Public License (MPL) along with a GitHub repository. He had thought that his decision not to obfuscate the game's code would be enough for curious developers, but the clamor for a formal open-source release of the gratis game led him to pick a license.

Townsend released ADR as open source out of a desire to encourage creativity and skill development. The game also gained some improvements following the open-source release:

I chose open source mostly for ideological reasons. I want to see people learning, and building their own cool things on the internet. Making my source code freely available is something I can do to help make that happen. The open source community has definitely made ADR a better game than it was when I launched it. Extra content has been added, bugs have been fixed, and it's now playable in a bunch of different languages.

Written from scratch in JavaScript, HTML5, and CSS, ADR's code was hacked together without Townsend being concerned about optimizing it on a technical level. He was more interested in getting the project done. He had considered using pre-made solutions like Twine, which is an "open-source tool for telling interactive, nonlinear stories" that can be published directly to HTML. But he found that it was too simple for his needs and not as much fun as building the game completely on his own. When ADR got attention on Hacker News, he felt a bit mortified about the code: "Oh no! The nerds are going to tear it apart!"

The game's code is simple. After writing it, though, he discovered the AngularJS web application framework that he now realizes could have provided the technical foundation for the game. ADR connects with Dropbox for handling game save data, and uses Google Analytics to track how players progress through the game to give him feedback about how to improve it. Users can export saved games to continue from a different device; it's a simple matter of generating a unique code that can be entered from a different machine to resume.

"You probably shouldn't look at the code as a good project", Townsend warned, as he was aware that his interview was for a technical news site. There is not much separation between the game's code and its assets (e.g. the strings making up the text of the game). This intermingling of code and assets makes it harder for an interested developer to write a new story using ADR's engine as a base. However, some separation has been made to facilitate translation, which is ongoing; thanks to outside contributions, the game is available in multiple languages. Townsend noted that one could replace certain modules of the game with new ones to create new scenes or game levels.

Although the game did make an impact in the independent video game scene in 2013, it would be a later release on iOS that would garner the game financial success and widespread news attention. A software developer named Amir Rajan, who is a fan of the game, contacted Townsend soon after the Hacker News posting. Rajan wanted to "reboot his life": he had recently quit his job, scaled down his living expenses, and was interested in pursuing a project out of pleasure, using his savings to pay for his day-to-day needs while developing it.

Rajan asked Townsend if he could port ADR to iOS devices (the iOS version remains proprietary; Townsend said it is up to Rajan whether or not that version will be opened up). Townsend agreed, on the condition that he retain a creative veto and receive 50% of any royalties. He did not hear from Rajan for several months, but ended up satisfied with his work. The game was ported to iOS using the proprietary RubyMotion implementation of the Ruby programming language.

Townsend ensured that third-party improvements to ADR's open-source code on GitHub were not incorporated into the iOS app:

The iOS version was written entirely from scratch, and no open source contributions have been incorporated into it. Amir built the iOS version independently, using my original code-base as a guide. It'd be pretty sleazy to take the work of my open source collaborators and sell it on the app store without some sort of compensation.

Following a release toward the end of 2013, the iOS version would bring in a few hundred dollars a month in royalties, but exploded in popularity in 2014. Both Townsend and Rajan remain mystified as to the causes of the game's financial success; they could not find any correlation between an increase in sales and media coverage.

While the iOS version was its financially successful incarnation, ADR's GitHub repository for the original, open-source browser game remains active. Although Townsend hadn't touched the JavaScript and CSS in a while, he still continues to use the repository to make tweaks and merge pull requests. The bulk of the recent changes are translations, with a recent addition of Polish.

Notwithstanding the success of ADR's proprietary iOS version, Townsend emphasized the importance of open-source game development to him. He opened up the source for ADR's browser version to help other potential game developers learn from his experience. Nonetheless, some third-party use of his code has led to some irritations for Townsend, as quoted by Rajan on his blog:

I open-sourced A Dark Room exactly because I wanted people to be able to learn from it, and use it as a starting point for their own projects. That said, I'll admit to being a little disheartened that people are taking advantage of the brand that I've built to make a quick buck.

There are a few versions of the browser-based ADR ported to Android, but they are largely just copies of the browser game's code wrapped in PhoneGap, which is "a free and open source framework that allows you to create mobile apps using standardized web APIs". Without further optimization made for mobile devices, it makes for a sub-par experience; users connecting to the web game through their phones are given a warning page that the game works poorly on mobile devices. No such warning is available on the Android apps.

This has led to some individuals complaining to Townsend about the poor quality of the Android versions, which he had nothing to do with. He contacted some of the developers relaying his concerns; one was apologetic, explaining that they were just trying to learn about game development, while others refused to remove or alter their apps (some of which contain advertisements), citing the game's open-source license as justification.

Townsend has applied for a registered trademark on the name "A Dark Room" in association with video games, and is awaiting approval; if approved, he intends to use the trademark to demand name changes from these developers. He would be content if the game itself remains unchanged, as long as the title is changed to disassociate third-party versions from his authorized ones. Townsend does take comfort in the fact that these clones are nowhere near as popular as the iOS version; that an official Android app is currently in private beta may dull some of the sting as well.

Townsend continues to work a day job (he does full-stack web development for travel website TripAdvisor), while pursuing game development as a side project. His latest game, Gridland, is a fun mash-up of match-three puzzle games like Bejeweled with shelter building and survival mechanics vaguely reminiscent of a simplified Minecraft. It is available gratis online with an open-source release coming soon. Meanwhile, the ADR universe has expanded with Rajan releasing a proprietary prequel to ADR on iOS, The Ensign, and Townsend considering a sequel. Townsend remains committed to open-source game releases under the name Doublespeak Games; it will be interesting following his journey as a game developer in the years to come.

Comments (3 posted)

Adobe releases source code for OpenType font-development tools

By Nathan Willis
September 24, 2014

ATypI 2014

Adobe made a surprise announcement at the annual ATypI conference in Barcelona, Spain, releasing one of the company's proprietary font-production tools under an open-source license. In addition, the team convinced another popular font-development project to release its core library as open source, too. Adobe framed the release as a move designed to help improve the quality of fonts produced with any application, but there may be other benefits as well—such as increasing the spread of Adobe's own open fonts. Up until now, those fonts have not been redistributable by many other free-software projects, precisely because the production tools needed to build them remained closed.

David Lemon, manager of Adobe's type team, made the announcement in his talk entitled "A win/win approach to open source." Lemon began the session by recounting Adobe's history with open-source software, as well as his personal involvement. Over the 28 years he has spent at Adobe, he said, he had gone from thinking that open source was "just plain crazy" to becoming one of its biggest advocates within the company.

Standardization and platforms

Lemon noted that free software has its roots in communities like academia that regard sharing information as the default policy and as an ethical position, while "open source" puts the emphasis on the quality of the code produced. Inside Adobe, he explained, both viewpoints have proven important at differing times. The company has long understood the value that comes from publishing a public specification, which it did, for example, with PostScript in 1984. Despite PostScript being given away, he noted, the product still makes money for Adobe today.

[David Lemon at ATypI 2014]

Similarly, Adobe published the Type 1 font format in 1990 in the face of competition from TrueType, which was a joint effort of Apple and Microsoft. There are many other reasons why Type 1 has survived, he said, but publishing an open specification was certainly one of them. The PDF specification was another such giveaway, and became a critical platform on which many other products are built. That cemented the idea within Adobe that publishing a standard rather than keeping it secret was a path to success.

At the same time, though, Adobe still struggled to make technologies like Type 1 viable in the marketplace because operating system vendors controlled the platform. The company's initial attempt to circumvent this hurdle was Adobe Type Manager (ATM), a proprietary product that added real-time Type 1 rasterization to Windows and Macintosh systems. Though popular with graphic designers (in part due to its other functions, like managing large font collections), ATM was never a money maker. Eventually, Adobe decided instead to work directly with Apple and Microsoft to get Type 1 rendering incorporated directly into the operating system. The result was that Type 1 gained "equal citizenship on the desktop."

As everyone now recognizes, though, Apple and Microsoft desktop systems are no longer the only platforms that matter—and perhaps not even the most important ones. So, Lemon said, when Adobe realized a few years ago that it was now facing a similar situation with mobile platforms and the web, it decided to take a different approach. The issue at hand was making the Compact Font Format (CFF), the modern successor to Type 1, viable for browsers and mobile devices. On those platforms, TrueType fonts still dominated, but essentially for legacy reasons.

So the company took its CFF rasterizing engine, released it as an open-source product, and donated it to the FreeType project—thus bringing high-quality CFF support to Android and to the most popular web browsers. Adobe still maintains the CFF rendering code to this day, Lemon added. And Adobe has rolled out many other open-source products and projects, he said: the company currently has 99 repositories active on GitHub.

Fonts and tools

One of Adobe's first major open-source products was the online code editor Brackets. Brackets and other such products require fonts with compatible licensing, of course, and Lemon noted that six or seven years ago when the effort began, Adobe did not see any open fonts it was satisfied with. So the company's type team "rolled it own"—first Source Sans Pro, followed by Source Code Pro, and, most recently, Source Serif Pro and the massive pan-CJK (Chinese-Japanese-Korean) font Source Han Sans. The family of fonts has expanded to numerous weights, added scripts like Cyrillic and Greek, and has added features at the request of Adobe product teams—and occasionally outsiders.

That said, Lemon did express some disappointment that there have been few contributions to the fonts from third parties. Adobe had donated fonts to the X Window Consortium years ago, he noted, but the Source Pro project was supposed to be different—a project, not a donation. The magnitude of the response from users was overwhelming, he said, and "although we're quite proud of our QA," the fonts' hundreds of thousands of users "find every little issue" to file a bug report on. To date, though, only one outside designer has contributed a significant number of glyphs.

But one major prerequisite to contributing is access to the tools for building and testing the fonts. This is where Adobe Font Development Kit for OpenType (AFDKO) comes into play. AFDKO is a suite of tools for validating and modifying fonts in the OpenType format (which can encapsulate either TrueType or CFF data). It is also a key part of Adobe's build and release processes. The company regards it as a platform-growing asset intended to spread OpenType adoption; although proprietary applications can work with it and the company provides AFKDO training, it is not a product intended for monetization. Lemon pointed out that it has been available free-of-charge since 2000 (at least for Windows and Mac OS X). The company even released a Linux version in March of 2014.

But free-of-charge simply is not sufficient for all users. Open-source projects could not package AFDKO for license-compatibility reasons, and some projects will not accept binaries (such as fonts) built with any proprietary tools. In addition, Lemon said, there were even some proprietary software companies that would not allow their employees to install and use AFDKO, because the company legal team objected to the end-user license agreement (he named Apple as one such company, but called it a recurring issue).

So, although Adobe wanted AFDKO to improve OpenType support everywhere, it was not having the desired effect. Furthermore, he added, "there is only one open-source font editor, and it sucks"—although he quickly added that was happy to see that there is a lot of recent work going into it, with a number of improvements.

The solution was to make AFDKO open-source software. Lemon said he was excited to announce that as of now, AFDKO is available under the Apache 2.0 license from the Adobe type team's GitHub repository. The existing, pre-packaged version will also remain available under the old terms, "for simplicity's sake," he said.

Around the FDK

Lemon then took a few minutes to detail the contents of the repository. There are around 20 utilities included. Many are Python or shell scripts, but he cautioned that the initial release was "batteries not included." Specifically, installation scripts are missing for the time being, and dependency issues or other hurdles should be expected.

The main use cases of the AFDKO tools are quickly adding the advanced features of the OpenType file format to an existing font, running quality-control and validation checks, and automating build operations. The AFDKO site maintains a description of each tool's capabilities.

Unfortunately, he said, there are two pieces of the original AFDKO that the team was unable to include in the open-source release. Both contain patented code from elsewhere in Adobe, which those other projects were not interested in releasing. One is the checkOutlines tool, which performs a number of validation checks on the Bézier curves in a font—most importantly, removing overlaps. The other is IS—for "intelligent scaling"—which is used to rescale fonts while automatically adjusting the embedded TrueType hints. Lemon noted that the team had identified a possible replacement for checkOutlines already.

Lemon also told the audience that, although he hopes the open-source AFDKO will help improve other font tools, he also hopes that people will contribute their own improvements back to AFDKO. Already the team has begun extending its capabilities, he said. The initial release includes a new set of interpolation functions based on the engine found in Erik van Blokland's highly successful Superpolator application.

Superpolator itself remains closed source, but the AFDKO team convinced Van Blokland to package the core engine into a reusable library, which he also released under an open-source license during the conference. The library is called MutatorMath, and is available from its own GitHub repository under a BSD license. MutatorMath can interpolate entire fonts based on an arbitrary number of interpolation axes (e.g., weight, width, slant, contrast, serif style, etc).

Up next

Lemon concluded his talk by promising that although open source may not take over Adobe, "as long as it continues improving our work, we'll keep doing it." He said more source code was still to come from the type team, starting with some CJK tools built during the development of Source Han Sans.

Outside of the ATypI venue, the AFDKO and MutatorMath releases did not go unnoticed by the free-software community. Shortly after the release announcements (which had been rumored, if not expected, in several circles), a Debian intent to package (ITP) issue was opened up for AFDKO. Bug reports have already started appearing in GitHub, particularly with regard to the dependencies and the build process.

Perhaps most interesting to note is that Debian developers have also announced their desire to package the Source Pro fonts in the wake of the AFDKO release. The software tools may benefit FontForge (the open-source font editor that, presumably, Lemon referred to in his critique) and other free-software applications, but that will take time. The most immediate impact of the release may be that it will, for the first time, be possible to build Adobe's open fonts from source using only free software. Lemon did not delve into the details of that issue during his talk, but being unable to build the Source Pro family with free software has undoubtedly kept at least some potential contributors away.

It is hard to predict whether or not any major contributions might arise as a result, of course, but a fully open-source build chain certainly opens the door to any number of new developments down the line.

Comments (2 posted)

Page editor: Jonathan Corbet

Security

Schneier on incident response

By Jake Edge
September 24, 2014

AppSec USA

Bruce Schneier is a cryptographer and security specialist who is well-known in computer circles even though he has often branched into more general security areas in recent years. His blog is a great source of security news (and, of "quotes of the week" for this page, as readers know). Beyond all that, he travels to many security conferences to give talks, which is just what he did at AppSec USA in Denver on September 18. The keynote topic was "incident response" (IR), which is an area that is finally getting more attention in the security-product space, he said.

Interestingly, Schneier's talk didn't really dwell all that much on IR. Instead, he looked at some trends that are changing the industry, along with some economic principles that are relevant to the computer security market. Along the way, he also described a feedback loop that is used by the US Air Force (USAF) and how it relates to network attacks and the response to them.

Three trends

[Bruce Schneier]

There are three trends that are currently important to the security industry, he said. The first is that we are "losing control of our infrastructure", which is the result of two separate things. The rise of cloud computing "means we no longer have control of our data". Schneier uses Eudora for his email, "but I am a freak". His company (he is the CTO at Co3 Systems, which makes IR tools, as he disclosed near the end of the talk), however, outsources its email to Google.

Moving data to the cloud means that we cannot affect the security of the system any longer, he said. You can't ask Google for more security on your email storage, you just get what they provide. You also have no idea where the actual physical bits of your data reside; they could be anywhere in the world.

We are also accessing our data with devices that we have less control over, which is also a loss of infrastructure control. Mobile devices are often locked down, such that we can't even wipe their memory and storage because there is no access at that level. There are lots of good reasons for locking down devices in that manner, but it does affect security. The business case for companies like Apple and Microsoft to control these devices is quite strong, to the point that Schneier expects to see phone and desktop operating systems converge—to somewhere that is much closer to the "less user control" phone side of that continuum.

The second major trend is that attacks are getting more sophisticated, as we have seen over the last few years. There is a lot of "cyberwar" rhetoric and there is clearly an increase in the capabilities of attackers. He doesn't really like the term "cyberwar", since we are not actually fighting a war in cyberspace, but there are parallels between actual warfare and the internet-based attacks occurring today.

In real wars, you can generally determine who the attacker is by the weaponry used—a tank means a government, since no one else can afford them. In computer attacks, that is not true: everyone is using the same weapons.

You can place attackers on a two-axis graph, where the axes are "skill" and "focus", Schneier said. Script kiddies are clearly low skill, low focus, while attacks like that against Target are from high-skill, low-focus attackers—they didn't want Target's customers' credit card information, they just wanted credit card data. In that case, relative security matters. Since Target was not as well-secured as its "neighbors", it was attacked.

But high-skill, high-focus attacks, like advanced persistent threats (APTs), make for a completely different threat model. APTs are personal for some reason; the attacker wants to get at a particular target. Protecting against that kind of attack comes down to absolute security: is the attacker better than the defender?

As it turns out, we know the answer to that question: yes. When penetration testers attempt to get into a system or network, they essentially always do, he said. We do not know how to defend against targeted attacks. In the history of warfare, as weapons and defenses have evolved, sometimes the attacker has had the advantage and sometimes it has been the defender. On the internet right now, the attacker has the advantage and will for the foreseeable future, Schneier said.

The final trend that he noted was the increasing government involvement in cyberspace. It goes beyond the NSA and other secret services spying on internet activity. There is a "complicated regulatory environment", which means that there is a lot of "legal stuff that organizations have to know and follow". Businesses and other organizations tend to be collateral damage when governments act on the internet—to censor it, conduct espionage on it, or attack adversaries using it. All of that is only going to get worse, he said.

Economics

Schneier then moved into some economic principles that are important to consider when looking at the market of computer-security products. First, network effects are crucial to the success of a product. He cited Metcalfe's law (the value of a network is proportional to the square of the number of connected users) to explain how network effects work for things like SMS, Skype, and Facebook. It is also important to the battle between iOS and Android, or between Mac OS X and Windows. The "big get bigger" due to network effects; Facebook gets bigger because you are going to join the network where your friends are, not the network that is better.

Another important economic concept is fixed vs. marginal costs. For physical products, much of the cost is in marginal costs, whereas in software it is almost all in fixed costs. Creating the first copy of a program costs a lot, but each copy after that costs little to produce. Books are similar, he said. Some printing company could (illegally) start producing copies of his books and sell them for a few dollars, since they would not have to recover the fixed cost by paying him royalties. He could retaliate by temporarily dropping the cost of his book below that of the "competitor", to drive them out of business—which is the tactic that Walmart employs against its local competition, he said.

"Switching costs" is yet another principle that comes into play. It is much more expensive to switch cell phone providers than it is to switch cola brands. He cited Shapiro and Varian's "fundamental theorem" that the total value of a software company is the cumulative cost for its customers to switch to a competitor. In effect, "the higher the switching costs, the more the company can piss you off", he said. AT&T just has to "not suck", while a cola has to be better in some measure.

Another example of high switching costs is trying to move from iTunes to something else: "good luck taking your music" with you. The same goes for trying to move from a Kindle to a Nook (or vice versa). Cell-phone-number portability is an effort to lower switching costs, since a user can switch without having to update all of their contacts, print new business cards, and so on.

The "lemons market" is an idea by George Akerlof that won him the Nobel Prize in Economics. It concerns markets where sellers know a lot more than buyers (i.e. asymmetric markets). In those markets, "bad products drive good products out of the market". If the buyer cannot tell the difference between a good and a bad product, they will buy the bad because it is cheaper, he said. If there are two encryption products on the market, both with the same algorithms, but one is implemented well and the other not, buyers will buy the cheaper one.

This is why "signals" are important. Things like certifications and "those really dumb awards at conferences" are useful. Those are signals that allow the buyers to convince themselves they are buying a "not bad" product. The old adage that "no one ever got fired for buying IBM" is another kind of signal.

The final economic principle Schneier mentioned is "prospect theory", which came from two psychologists. They are the only non-economists to win the Nobel Prize in Economics and they did so by "telling economists that everything they believe is wrong", Schneier said with a chuckle. Unlike previous models, prospect theory shows that humans are risk-averse when it comes to losses, and risk-seeking when it comes to gains.

[Bruce Schneier]

This behavior is also observed in other primates, Schneier said. The best explanation he has heard comes from evolutionary biology. If you consider a species on the edge of extinction, even a small loss means they are dead. If they can avoid any chance of that loss, they are better off. But a small gain is worth seeking because it will improve the chances to live to see another day.

That theory explains why it is difficult to sell cybersecurity. It is the same with insurance or burglar alarms, he said. If you go to your boss to say you need something to secure the network, he is likely to point out that you didn't have it last month and the network ran just fine. It is not impossible to sell cybersecurity, but it does require fighting against this basic psychological principle.

Response

In computer security, there is a need for response, because both prevention and detection are imperfect. He used to say that security is a process, not a product, but that was a "strategic idea". If you look at it more tactically, security is both a process and a product. He now talks about "people, process, and technology".

But there is a general idea that people can't help with security. There is a focus on automation for tasks like threat detection and system updates. However, response cannot be fully automated because it requires people to understand and react to what is happening. All attacks are different, the networks are different, the regulatory environments are different, and on and on. Those things are not necessarily different in technical ways, either; they are different in "people ways".

All of that means the people-to-technology ratio goes up for response. If you look at real-world emergency response (e.g. police and firefighters), it is similar. And, like with those organizations, security response needs technology that supports people, rather than replacing them.

That's where the USAF's feedback loop comes into play. An observe-orient-decide-act (OODA) loop is what pilots repeatedly use during a dogfight. If you can perform that loop faster than your opponent, you will win the fight. The USAF uses the OODA loop to evaluate technology—it wants technology that supports the pilot in handling one of those four functions.

The same OODA loop is present in incident response, Schneier said. The speed of handling that loop is crucial. Being faster than the attacker means getting them out of your system. So the security industry needs tools to facilitate the OODA loop.

That means better tools to observe what is happening (observe) and to fill in the context from the outside world (orient), which would provide information like the presence of new malware observed in the wild, an upheaval in some country, or that the company is going through a merger. Tools to help with the decision-making process are needed as well (decide), which is an area that needs a lot more work, he said. Who gets to decide, and how those decisions are audited after the fact, are two important pieces of the puzzle. Finally, there is a need for tools to help take the decision and make it happen (act). All those areas are ripe for new tools and we are starting to see them, he said.

For the security industry, the 1990s were the decade of protection, while the 2000s were the decade of detection. This decade will be the decade of response. But, unlike protection and detection tools, response tools will not suffer the same fate—bad products pushing out the good. Because response tools will be people-oriented, the good products will beat out the bad. Incident response tools and products will change the industry, Schneier concluded.

Comments (16 posted)

Brief items

Security quotes of the week

Unfortunately for our defender Alice, modern FPGAs often contain hard IP blocks such as SERDES and RAM controllers. These present a far more attractive target to Malfab [Malicious Fabricator] as their functionality is largely known in advance.

It is not hard to imagine, for example, a malicious patch to the RAM controller block which searches each byte group for a magic sync sequence written to consecutive addresses, then executes commands from the next few bytes. As long as Malfab is able to cause the target's system to write data of his choice to consecutive RAM addresses (perhaps by sending it as the payload of an Ethernet frame, which is then buffered in RAM) he can execute arbitrary commands on the backdoor engine.

— Andrew Zonenberg looks at threat models for FPGAs (Thanks to Paul Wise.)

This is the problem with building an infrastructure of surveillance: you can't regulate who gets to use it. The FBI has been protecting Stingray like it's an enormous secret, but it's not a secret anymore. We are all vulnerable to everyone because the NSA wanted us to be vulnerable to them.

We have one infrastructure. We can't choose a world where the US gets to spy and the Chinese don't. We get to choose a world where everyone can spy, or a world where no one can spy. We can be secure from everyone, or vulnerable to anyone. And I'm tired of us choosing surveillance over security.

— Bruce Schneier

Like most Americans, conservatives do not know very much about Net Neutrality.

What they do know about it makes it sound like a terrible idea: a bunch of Silicon Valley elites, backed by the Google panopticon and the Mozilla jerks who publicly executed Brendan Eich over his quiet support for traditional marriage, are demanding that the FCC impose sweeping regulations on the companies who bring the Internet to your door. With help from their close ally President Obama, these shysters have made tremendous forward progress against the so-called “evil” corporations who (in reality) own, develop, and generally manage the series of tubes that make up the Internet [YouTube] – corporations who have, in short, ushered in the entire Internet Age and all the good it entails. The only people in this drama who are holding off the regulators are the valiant heroes at the Wall Street Journal and the National Review, who are not afraid to stand athwart the regulatory agenda yelling “stop!,” demanding free markets and free peoples and not an iota less.

— James J Heaney in "Why Free Marketeers Want To Regulate the Internet"

Comments (67 posted)

Simply Secure announces itself

A new organization to "make security easy and fun" has announced itself in a blog post entitled "Why Hello, World!". Simply Secure is targeting the usability of security solutions: "If privacy and security aren’t easy and intuitive, they don’t work. Usability is key." The organization was started by Google and Dropbox; it also has the Open Technology Fund as one of its partners. "To build trust and ensure quality outcomes, one core component of our work will be public audits of interfaces and code. This will help validate the security and usability claims of the efforts we support. More generally, we aim to take a page from the open-source community and make as much of our work transparent and widely-accessible as possible. This means that as we get into the nitty-gritty of learning how to build collaborations around usably secure software, we will share our developing methodologies and expertise publicly. Over time, this will build a body of community resources that will allow all projects in this space to become more usable and more secure."

Comments (56 posted)

Kali NetHunter turns Android device into hacker Swiss Army knife (Ars Technica)

Ars Technica takes a look at Kali Linux NetHunter, a penetration testing platform for Nexus devices. "NetHunter is still in its early stages, but it already includes the ability to have the Nexus device emulate a USB human interface device (HID) and launch keyboard attacks on PCs that can be used to automatically elevate privileges on a Windows PC and install a reverse-HTTP tunnel to a remote workstation. It also includes an implementation of the BadUSB man-in-the-middle attack, which can force a Windows PC to recognize the USB-connected phone as a network adapter and re-route all the PC’s traffic through it for monitoring purposes."

Comments (none posted)

Security Collapse in the HTTPS Market (ACM Queue)

ACM's Queue has a lengthy article on the security failures in the HTTPS layer and the prospects for improvement. "This article outlines the systemic vulnerabilities of HTTPS, maps the thriving market for certificates, and analyzes the suggested regulatory and technological solutions on both sides of the Atlantic. The findings show existing yet surprising market patterns and perverse incentives: not unlike the financial sector, the HTTPS market is full of information asymmetries and negative externalities, as a handful of CAs dominate the market and have become 'too big to fail.' Unfortunately, the proposed E.U. legislation will reinforce systemic vulnerabilities, and the proposed technological solutions are far from being adopted at scale. The systemic vulnerabilities in this crucial technology are likely to persist for years to come"

Comments (none posted)

A remotely exploitable hole in bash

The bash shell has a vulnerability in its environment variable processing that could be remotely exploited in some situations — with CGI scripts being at the top of the list. "The fact that an environment variable with an arbitrary name can be used as a carrier for a malicious function definition containing trailing commands makes this vulnerability particularly severe; it enables network-based exploitation." The problem was disclosed (a little) prematurely, so updates are still coming in from the distributors.

Full Story (comments: 61)

New vulnerabilities

apache-poi: two XML-handling flaws

Package(s):apache-poi CVE #(s):CVE-2014-3529 CVE-2014-3574
Created:September 19, 2014 Updated:February 23, 2015
Description: From the Red Hat bugzilla entries:

CVE-2014-3529: It was found that Apache POI would resolve entities in OOXML documents. A remote attacker able to supply OOXML documents that are parsed by Apache POI could use this flaw to read files accessible to the user running the application server, and potentially perform other more advanced XXE attacks.

CVE-2014-3574: It was found that Apache POI would expand an unlimited number of entities in OOXML documents. A remote attacker able to supply OOXML documents that are parsed by Apache POI could use this flaw to trigger a denial of service attack via excessive CPU and memory consumption.

Alerts:
Fedora FEDORA-2015-2087 apache-poi 2015-02-23
Mageia MGASA-2014-0550 apache-poi 2014-12-26
Fedora FEDORA-2014-10322 apache-poi 2014-09-19

Comments (none posted)

apt: code execution

Package(s):apt CVE #(s):CVE-2014-6273
Created:September 24, 2014 Updated:November 12, 2014
Description: From the Debian advisory:

The Google Security Team discovered a buffer overflow vulnerability in the HTTP transport code in apt-get. An attacker able to man-in-the-middle a HTTP request to an apt repository can trigger the buffer overflow, leading to a crash of the 'http' apt method binary, or potentially to arbitrary code execution.

Alerts:
Mageia MGASA-2014-0442 apt 2014-11-12
Ubuntu USN-2353-1 apt 2014-09-23
Debian DSA-3031-1 apt 2014-09-23

Comments (none posted)

bash: command execution

Package(s):bash CVE #(s):CVE-2014-6271
Created:September 24, 2014 Updated:September 30, 2014
Description: From the Red Hat advisory:

A flaw was found in the way Bash evaluated certain specially crafted environment variables. An attacker could use this flaw to override or bypass environment restrictions to execute shell commands. Certain services and applications allow remote unauthenticated attackers to provide environment variables, allowing them to exploit this issue. See this message for more details.

Alerts:
SUSE SUSE-SU-2014:1287-1 Containment-Studio 2014-10-14
SUSE SUSE-SU-2014:1260-1 bash 2014-09-30
Slackware SSA:2014-272-01 bash 2014-09-29
CentOS CESA-2014:1306 bash 2014-09-30
CentOS CESA-2014:1293 bash 2014-09-30
openSUSE openSUSE-SU-2014:1238-1 bash 2014-09-28
openSUSE openSUSE-SU-2014:1254-1 bash 2014-09-29
openSUSE openSUSE-SU-2014:1248-1 bash 2014-09-28
openSUSE openSUSE-SU-2014:1242-1 bash 2014-09-28
openSUSE openSUSE-SU-2014:1229-1 bash 2014-09-28
openSUSE openSUSE-SU-2014:1226-1 bash 2014-09-28
Mageia MGASA-2014-0393 bash 2014-09-28
SUSE SUSE-SU-2014:1223-1 bash 2014-09-27
Red Hat RHSA-2014:1311-01 bash 2014-09-26
openSUSE openSUSE-SU-2014:1308-1 bash 2014-10-20
openSUSE openSUSE-SU-2014:1310-1 bash 2014-10-20
Gentoo 201409-09 bash 2014-09-25
Scientific Linux SLSA-2014:1306-1 bash 2014-09-26
Red Hat RHSA-2014:1306-01 bash 2014-09-26
Oracle ELSA-2014-1306 bash 2014-09-26
Oracle ELSA-2014-1306 bash 2014-09-26
Oracle ELSA-2014-1306 bash 2014-09-26
Mandriva MDVSA-2014:190 bash 2014-09-26
Fedora FEDORA-2014-11527 bash 2014-09-26
Fedora FEDORA-2014-11514 bash 2014-09-26
CentOS CESA-2014:1306 bash 2014-09-26
CentOS CESA-2014:1306 bash 2014-09-26
CentOS CESA-2014:1306 bash 2014-09-26
Debian DSA-3035-1 bash 2014-09-25
Gentoo 201409-10 bash 2014-09-25
Ubuntu USN-2362-1 bash 2014-09-24
SUSE SUSE-SU-2014:1212-1 bash 2014-09-25
SUSE SUSE-SU-2014:1213-1 bash 2014-09-25
SUSE SUSE-SU-2014:1214-1 bash 2014-09-25
Slackware SSA:2014-267-01 bash 2014-09-24
Scientific Linux SLSA-2014:1293-1 bash 2014-09-24
Oracle ELSA-2014-1293 bash 2014-09-24
Oracle ELSA-2014-1293 bash 2014-09-24
Oracle ELSA-2014-1293 bash 2014-09-24
Oracle ELSA-2014-1294 bash 2014-09-24
Mandriva MDVSA-2014:186 bash 2014-09-24
Mageia MGASA-2014-0388 bash 2014-09-24
Fedora FEDORA-2014-11503 bash 2014-09-25
Fedora FEDORA-2014-11360 bash 2014-09-25
Debian DSA-3032-1 bash 2014-09-24
CentOS CESA-2014:1293 bash 2014-09-24
CentOS CESA-2014:1293 bash 2014-09-24
CentOS CESA-2014:1293 bash 2014-09-24
Red Hat RHSA-2014:1293-01 bash 2014-09-24
Red Hat RHSA-2014:1294-01 bash 2014-09-24

Comments (none posted)

c-icap: denial of service

Package(s):c-icap CVE #(s):CVE-2013-7401 CVE-2013-7402
Created:September 22, 2014 Updated:January 5, 2015
Description: From the Gentoo advisory:

c-icap contains a flaw in the parse_request() function of request.c that may allow a remote denial of service. The issue is triggered when the buffer fails to contain a ' ' or '?' symbol, which will cause the end pointer to increase and surpass allocated memory. With a specially crafted request (e.g. via the OPTIONS method), a remote attacker can cause a loss of availability for the program.

Alerts:
Mandriva MDVSA-2015:001 c-icap 2015-01-05
Mageia MGASA-2014-0530 c-icap 2014-12-19
Debian DSA-3101-1 c-icap 2014-12-13
Gentoo 201409-07 c-icap 2014-09-19

Comments (none posted)

chromium: denial of service

Package(s):chromium CVE #(s):CVE-2014-3178 CVE-2014-3179
Created:September 22, 2014 Updated:October 10, 2014
Description: From the CVE entries:

Use-after-free vulnerability in core/dom/Node.cpp in Blink, as used in Google Chrome before 37.0.2062.120, allows remote attackers to cause a denial of service or possibly have unspecified other impact by leveraging improper handling of render-tree inconsistencies. (CVE-2014-3178)

Multiple unspecified vulnerabilities in Google Chrome before 37.0.2062.120 allow attackers to cause a denial of service or possibly have other impact via unknown vectors. (CVE-2014-3179)

Alerts:
openSUSE openSUSE-SU-2014:1378-1 chromium 2014-11-10
Ubuntu USN-2345-1 oxide-qt 2014-10-14
Mageia MGASA-2014-0413 chromium-browser-stable 2014-10-09
Debian DSA-3039-1 chromium-browser 2014-09-28
Gentoo 201409-06 chromium 2014-09-19

Comments (none posted)

haproxy: denial of service

Package(s):haproxy CVE #(s):CVE-2014-6269
Created:September 24, 2014 Updated:September 24, 2014
Description: From the Red Hat advisory:

A buffer overflow flaw was discovered in the way HAProxy handled, under very specific conditions, data uploaded from a client. A remote attacker could possibly use this flaw to crash HAProxy.

Alerts:
Oracle ELSA-2014-1292 haproxy 2014-09-24
CentOS CESA-2014:1292 haproxy 2014-09-24
Red Hat RHSA-2014:1292-01 haproxy 2014-09-24

Comments (none posted)

haproxy: unspecified vulnerabilities

Package(s):haproxy CVE #(s):
Created:September 19, 2014 Updated:September 24, 2014
Description: The Fedora advisory simply says:

Update to upstream stable release 1.5.4

Alerts:
Fedora FEDORA-2014-10497 haproxy 2014-09-19

Comments (none posted)

kernel: three vulnerabilities

Package(s):kernel CVE #(s):CVE-2014-3186 CVE-2014-3181 CVE-2014-6410
Created:September 19, 2014 Updated:December 11, 2014
Description: From the Red Hat bugzilla entries:

CVE-2014-3186: Linux kernel built with the Human Interface Device(HID) Bus support(CONFIG_HID) along with a driver for Minibox PicoLCD devices support(CONFIG_HID_PICOLCD), is vulnerable to an OOB write flaw. It could occur if a device offers an HID report with arbitrary(>64) data size value. A local user with physical access to the system could use this flaw to crash the system resulting in DoS or potentially, escalate their privileges on the system.

CVE-2014-3181: Linux kernel built with the Human Interface Device(HID) Bus support(CONFIG_HID) along with a driver for Apple Magic Mouse/Trackpad multi-touch, is vulnerable to an OOB write flaw. It could occur if a device offers an HID report of arbitrary length. A local user with physical access to the system could use this flaw to crash the system resulting in DoS or potentially, escalate their privileges on the system.

CVE-2014-6410: Linux kernel built with the UDF file system support(CONFIG_UDF_FS) is vulnerable to a crash due to stack overflow through infinite recursion. It occurs while traversing a long ICB hierarchy. a user/program able to mount such a file system could use this flaw to crash the system kernel resulting in DoS.

Alerts:
openSUSE openSUSE-SU-2015:0566-1 kernel 2015-03-21
Oracle ELSA-2015-3012 kernel 2015-03-19
Oracle ELSA-2015-3012 kernel 2015-03-19
SUSE SUSE-SU-2015:0481-1 kernel 2015-03-11
Oracle ELSA-2015-0290 kernel 2015-03-12
SUSE SUSE-SU-2014:1695-2 Linux kernel 2015-01-14
SUSE SUSE-SU-2014:1695-1 kernel 2014-12-23
SUSE SUSE-SU-2014:1693-1 kernel 2014-12-23
SUSE SUSE-SU-2014:1693-2 kernel 2014-12-24
openSUSE openSUSE-SU-2014:1669-1 kernel 2014-12-19
openSUSE openSUSE-SU-2014:1677-1 kernel 2014-12-21
Debian-LTS DLA-118-1 linux-2.6 2014-12-21
Scientific Linux SLSA-2014:1997-1 kernel 2014-12-17
Oracle ELSA-2014-1997 kernel 2014-12-16
CentOS CESA-2014:1997 kernel 2014-12-17
Red Hat RHSA-2014:1997-01 kernel 2014-12-16
Oracle ELSA-2014-3103 kernel 2014-12-11
Oracle ELSA-2014-3104 kernel 2014-12-11
Oracle ELSA-2014-3105 kernel 2014-12-11
Oracle ELSA-2014-3103 kernel 2014-12-11
Oracle ELSA-2014-3105 kernel 2014-12-11
Oracle ELSA-2014-3104 kernel 2014-12-11
Scientific Linux SLSA-2014:1971-1 kernel 2014-12-10
Oracle ELSA-2014-1971 kernel 2014-12-09
CentOS CESA-2014:1971 kernel 2014-12-10
Red Hat RHSA-2014:1971-01 kernel 2014-12-09
Oracle ELSA-2014-3096 kernel 2014-12-04
Oracle ELSA-2014-3096 kernel 2014-12-04
Oracle ELSA-2014-3084 kernel 2014-10-30
Oracle ELSA-2014-3085 kernel 2014-10-30
Oracle ELSA-2014-3085 kernel 2014-10-30
Oracle ELSA-2014-3084 kernel 2014-10-30
SUSE SUSE-SU-2014:1316-1 Linux kernel 2014-10-22
SUSE SUSE-SU-2014:1319-1 Linux kernel 2014-10-23
Ubuntu USN-2377-1 linux-ti-omap4 2014-10-09
Ubuntu USN-2378-1 linux-lts-trusty 2014-10-09
Ubuntu USN-2374-1 kernel 2014-10-09
Ubuntu USN-2376-1 kernel 2014-10-09
Ubuntu USN-2379-1 kernel 2014-10-09
Ubuntu USN-2375-1 EC2 kernel 2014-10-09
Fedora FEDORA-2014-11008 kernel 2014-09-30
Red Hat RHSA-2014:1318-01 MRG Realtime 2014-09-29
Fedora FEDORA-2014-11031 kernel 2014-09-19
Mandriva MDVSA-2014:201 kernel 2014-10-21

Comments (none posted)

kernel: denial of service

Package(s):kernel CVE #(s):CVE-2014-3601
Created:September 24, 2014 Updated:September 29, 2014
Description: From the CVE entry:

The kvm_iommu_map_pages function in virt/kvm/iommu.c in the Linux kernel through 3.16.1 miscalculates the number of pages during the handling of a mapping failure, which allows guest OS users to (1) cause a denial of service (host OS memory corruption) or possibly have unspecified other impact by triggering a large gfn value or (2) cause a denial of service (host OS memory consumption) by triggering a small gfn value that leads to permanently pinned pages.

Alerts:
Oracle ELSA-2015-2152 kernel 2015-11-25
SUSE SUSE-SU-2015:0736-1 Real Time Linux Kernel 2015-04-20
SUSE SUSE-SU-2015:0581-1 kernel 2015-03-24
openSUSE openSUSE-SU-2015:0566-1 kernel 2015-03-21
Oracle ELSA-2015-3012 kernel 2015-03-19
Oracle ELSA-2015-3012 kernel 2015-03-19
SUSE SUSE-SU-2015:0481-1 kernel 2015-03-11
Red Hat RHSA-2015:0674-01 kernel 2015-03-11
Mageia MGASA-2015-0078 kernel-vserver 2015-02-19
Mageia MGASA-2015-0076 kernel-tmb 2015-02-19
Mageia MGASA-2015-0077 kernel-rt 2015-02-19
Mageia MGASA-2015-0075 kernel-linus 2015-02-19
SUSE SUSE-SU-2014:1695-2 Linux kernel 2015-01-14
CentOS CESA-2015:0674 kernel 2015-03-12
Scientific Linux SLSA-2015:0674-1 kernel 2015-03-12
SUSE SUSE-SU-2014:1695-1 kernel 2014-12-23
SUSE SUSE-SU-2014:1693-1 kernel 2014-12-23
SUSE SUSE-SU-2014:1693-2 kernel 2014-12-24
Oracle ELSA-2014-3096 kernel 2014-12-04
Oracle ELSA-2014-3096 kernel 2014-12-04
Mandriva MDVSA-2014:230 kernel 2014-11-27
Mageia MGASA-2014-0479 kernel-vserver 2014-11-21
Mageia MGASA-2014-0455 kernel-vserver 2014-11-15
Mageia MGASA-2014-0459 kernel-tmb 2014-11-15
Mageia MGASA-2014-0452 kernel-tmb 2014-11-15
Mageia MGASA-2014-0456 kernel-linus 2014-11-15
Mageia MGASA-2014-0451 kernel-linus 2014-11-15
Mageia MGASA-2014-0454 kernel 2014-11-15
Mageia MGASA-2014-0453 kernel 2014-11-15
Scientific Linux SLSA-2014:1392-1 kernel 2014-11-03
CentOS 2014:X011 kernel 2014-10-01
Mageia MGASA-2014-0392 kernel 2014-09-28
Ubuntu USN-2357-1 linux-ti-omap4 2014-09-23
Ubuntu USN-2358-1 linux-lts-trusty 2014-09-23
Ubuntu USN-2356-1 kernel 2014-09-23
Ubuntu USN-2359-1 kernel 2014-09-23
Oracle ELSA-2014-1392 kernel 2014-10-21
Mandriva MDVSA-2014:201 kernel 2014-10-21
Red Hat RHSA-2014:1392-01 kernel 2014-10-14

Comments (none posted)

libav: multiple unspecified vulnerabilities

Package(s):libav CVE #(s):CVE-2013-7020
Created:September 18, 2014 Updated:November 25, 2014
Description: The Debian advisory has the following information, but the link doesn't provide any real information on which are being fixed for 0.8.15 (or .16), which is evidently the version being used:

Several security issues have been corrected in multiple demuxers and decoders of the libav multimedia library. A full list of the changes is available at http://git.libav.org/?p=libav.git;a=blob;f=Changelog;hb=refs/tags/v0.8.15

Alerts:
Gentoo 201603-06 ffmpeg 2016-03-12
Mandriva MDVSA-2014:227 ffmpeg 2014-11-25
Debian DSA-3027-1 libav 2014-09-17

Comments (none posted)

nginx: virtual host confusion attacks

Package(s):nginx CVE #(s):CVE-2014-3616
Created:September 22, 2014 Updated:February 9, 2015
Description: From the Debian advisory:

Antoine Delignat-Lavaud and Karthikeyan Bhargavan discovered that it was possible to reuse cached SSL sessions in unrelated contexts, allowing virtual host confusion attacks in some configurations by an attacker in a privileged network position.

Alerts:
Mandriva MDVSA-2015:094 nginx 2015-03-28
Gentoo 201502-06 nginx 2015-02-07
Mageia MGASA-2014-0427 nginx 2014-10-28
Ubuntu USN-2351-1 nginx 2014-09-22
Debian DSA-3029-1 nginx 2014-09-20
Fedora FEDORA-2014-11370 nginx 2014-10-10
Fedora FEDORA-2014-11415 nginx 2014-10-10

Comments (none posted)

pdns-recursor: denial of service

Package(s):pdns-recursor CVE #(s):CVE-2014-3614
Created:September 19, 2014 Updated:September 24, 2014
Description: From the Red Hat bugzilla entry:

Recently, we've discovered that PowerDNS Recursor 3.6.0 (but NOT earlier) can crash when exposed to a specific sequence of malformed packets. This sequence happened spontaneously with one of our largest deployments, and the packets did not appear to have a malicious origin. Yet, this crash can be triggered remotely, leading to a denial of service attack. There appears to be no way to use this crash for system compromise or stack overflow.

Alerts:
Fedora FEDORA-2014-10628 pdns-recursor 2014-09-19
Fedora FEDORA-2014-10632 pdns-recursor 2014-09-19

Comments (none posted)

phpmyadmin: privilege escalation

Package(s):phpmyadmin CVE #(s):CVE-2014-6300
Created:September 22, 2014 Updated:September 25, 2014
Description: From the Mageia advisory:

In phpMyAdmin before 4.1.14.4, by deceiving a logged-in user to click on a crafted URL, it is possible to perform remote code execution and in some cases, create a root account due to a DOM based XSS vulnerability in the micro history feature.

Alerts:
Gentoo 201505-03 phpmyadmin 2015-05-31
Fedora FEDORA-2014-10989 phpMyAdmin 2014-09-25
Fedora FEDORA-2014-10981 phpMyAdmin 2014-09-25
Mandriva MDVSA-2014:183 phpmyadmin 2014-09-24
openSUSE openSUSE-SU-2014:1150-1 phpMyAdmin 2014-09-22
Mageia MGASA-2014-0383 phpmyadmin 2014-09-22

Comments (none posted)

ReviewBoard: two vulnerabilities

Package(s):ReviewBoard CVE #(s):
Created:September 19, 2014 Updated:September 24, 2014
Description: From the ReviewBoard release notes:

Fixed a vulnerability where a URL to a diff fragment could be crafted that would inject custom HTML into the page. An attacker could send such a URL to another user and execute code in their browser session. This was reported by Uchida. A CVE number is pending.

The Original File and Patched File resources could be used to access files on a private review request that the user did not have access to, if they knew the appropriate database IDs. A CVE number is pending.

Alerts:
Fedora FEDORA-2014-8771 ReviewBoard 2014-09-19

Comments (none posted)

Page editor: Jake Edge

Kernel development

Brief items

Kernel release status

The current development kernel is 3.17-rc6, released on September 21. Linus said: "It's been quiet - enough so that coupled with my upcoming travel, this might just be the last -rc, and final 3.17 might be next weekend."

Stable updates: no stable updates have been released in the last week.

Comments (none posted)

Quotes of the week

The problem is that the current code enqueues the same structure onto up to four different lists, and we don't have a quantum computer, so head.next can't point to four different places.
— Paul McKenney

I seldom use printk these days. It's far too limited in its uses. For one, most things worth debugging happen thousands of times a second, and printk will just slow things down to a crawl if it is used.
— Steven Rostedt

Comments (3 posted)

Kernel development news

Non-blocking buffered file read operations

By Jonathan Corbet
September 23, 2014
It is natural to think of buffered I/O on Unix-like systems as being asynchronous. In Linux, the page cache exists to separate process-level I/O requests from the physical requests sent to the storage media. But, in truth, some operations are synchronous; in particular, a read operation cannot complete until the data is actually read into the page cache. So a call to read() on a normal file descriptor can always block; most of the time this blocking causes no difficulties, but it can be problematic for programs that need to always be responsive. Now, a partial solution is in the works for this kind of code, but it comes at the cost of adding as many as four new system calls.

The problem of blocking buffered reads is not new, of course, so applications have worked around it in a number of ways. One common approach is to create a set of threads dedicated to performing buffered I/O. Those threads can block while other threads in the program continue to do other work. This solution works and can be efficient, but it inevitably adds a certain amount of inter-thread communication overhead, especially in cases where the desired data is already in the page cache and a read() call could have completed immediately.

A recent patch set from Milosz Tanski attempts to solve the problem a different way. Milosz's approach is to allow a program to request non-blocking behavior at the level of a single read() call. Unfortunately, the current read() and variants do not have a "flags" argument, so there is no way to express that request using them. So Milosz adds two new versions of each of read() and write():

    int readv2(unsigned long fd, struct iovec *vec, unsigned long vlen, int flags);
    int writev2(unsigned long fd, struct iovec *vec, unsigned long vlen, int flags);
    int preadv2(unsigned long fd, struct iovec *vec, unsigned long vlen,
		unsigned long pos_l, unsigned long pos_h, int flags);
    int pwritev2(unsigned long fd, struct iovec *vec, unsigned long vlen,
		 unsigned long pos_l, unsigned long pos_h, int flags);

In each case, the system call is just like its predecessor with the exception of the addition of the flags argument. Note that the two offset parameters (pos_l and pos_h) to preadv2() and pwritev2() will be combined into a single off_t parameter at the C library level.

In Milosz's patch set, the only supported flag is RWF_NONBLOCK, which requests non-blocking operation. If a read request is accompanied by this flag, it will only complete if (at least some of) the requested data is already in the page cache; otherwise it returns EAGAIN. The current patch does not start any sort of readahead operation if it is unable to satisfy a non-blocking read request. The new write operations do not support non-blocking operation; the flags argument must be zero when calling them. Adding non-blocking behavior to write() is possible; such a write would only complete if memory were immediately available for a copy of the data in the page cache. But that implementation has been left as a future exercise.

Considering the alternatives

The patch is relatively simple and straightforward, but one might well wonder: why is it necessary to add a new set of system calls for non-blocking operation when the kernel has long supported this mode via either the O_NONBLOCK flag to open() or fcntl()? There are, it seems, a couple of reasons for not wanting to implement ordinary non-blocking I/O behavior for regular files, the first of which being that it will break applications.

Given that non-blocking I/O is an optional behavior that must be explicitly requested, it is not obvious that supporting it for regular files would create trouble. It comes down to the fact that passing O_NONBLOCK to an open() call actually requests two different things: (1) that the open() call, itself, not block, and (2) that subsequent I/O be non-blocking. There are applications that use O_NONBLOCK for the first reason; Samba uses it, for example, to keep an open() call from blocking in the presence of locks on the file. Since buffered reads have always blocked regardless of O_NONBLOCK, applications do not concern themselves with calling fcntl() to reset the flag before calling read(). If those read() calls start returning EAGAIN, the application, which is not expecting that behavior, will fail.

One could argue that this behavior is incorrect, but it has worked for decades; breaking these applications with a kernel change is not acceptable. Samba is not the only application to run into trouble here; evidently squid and GQview fail as well. So the problem is clearly real.

Beyond that, as Volker Lendecke explained, full non-blocking behavior would not play well with how applications like Samba want to use this feature. The wish is to attempt to read the needed data in the non-blocking mode; should the data not be available, the request will be turned over to the thread pool for synchronous execution. If the thread pool is using the same file descriptor, its attempts to perform blocking reads will fail. If it uses a different file descriptor, it can run into weird problems relating to the surprising semantics of POSIX file locks (see this article for more information). So the ability to request non-blocking behavior on a per-read basis is needed.

Another possibility would be to add a version of the fincore() system call, which allows a process to ask the kernel whether a specific range of file data is present in the page cache. Patches adding fincore() have been around since at least 2010. But fincore() is seen as a bit of an indirect route toward the real goal, and there is always the possibility that the situation might change between a call to fincore() and the application's decision to do something based on the result. Requesting non-blocking behavior with the read() avoids that particular race condition.

Finally, one could also consider the kernel's asynchronous I/O subsystem, which allows an application to obtain non-blocking behavior on a per-request basis. But asynchronous I/O has never been supported for buffered I/O, and attempts to add that functionality have bogged down in the sheer complexity of the problem. Adding non-blocking behavior to read() — where, unlike with asynchronous I/O, a request can simply fail if it cannot be satisfied immediately — is far simpler.

So the end result would appear to be that we will get a new set of Linux-specific system calls allowing applications to request non-blocking read() behavior on regular files. The rate of change on this patch set is slowing — though it is worth noting that readv2() and writev2() have been removed from the latest version (as of this writing) of the patch set. It is getting late to have this code ready for the 3.18 development cycle, but it should be more than ready for 3.19.

Comments (21 posted)

The BPF system call API, version 14

By Jonathan Corbet
September 24, 2014
Things happen quickly in the Berkeley Packet Filter (BPF) world. LWN last looked at this work in July, when version 2 of the patch set adding the bpf() system call had been posted. Two months later, this work is up to version 14; quite a bit has been changed and some functionality has been removed in an attempt to make the patches small enough for reviewers to cope with. At this point, though, the core system call may be reaching a point where it is getting close to ready for entry into the mainline. It seems like a good time for another look at this significant addition to the kernel's functionality, with fervent hopes that it doesn't change yet again.

BPF developer Alexei Starovoitov has certainly been energetic in his efforts to get this work in condition for merging — the posting of twelve versions in two months, many with significant changes, testifies to that. He has been responsive to requests for changes, but, as this complaint suggests, some developers have found him to be a little too pushy. That has not stopped some of his work from getting into the mainline, though, and, in the end, should not be a real impediment to the eventual merging of the rest.

As with previous versions, the BPF functionality is accessed by way of a single multiplexor system call, but that call has changed significantly:

   #include <linux/bpf.h>

   int bpf(int cmd, union bpf_attr *attr, unsigned int size);

The key change, made following a suggestion from Ingo Molnar, is to create a single large union type holding all of the possible parameter types for the various operations supported by bpf(). How that union is used depends on the specific command given to the system call.

Most of the operations in the current patch set are concerned with the management of maps — arrays of data that can be shared between a BPF program and user space. The process starts with the creation of a map, done with the BPF_MAP_CREATE command. With this command, the system call expects the relevant information to be in this member of the bpf_attr union:

    struct { /* anonymous struct used by BPF_MAP_CREATE command */
	__u32             map_type;
	__u32             key_size;    /* size of key in bytes */
	__u32             value_size;  /* size of value in bytes */
	__u32             max_entries; /* max number of entries in a map */
    };

The map_type field describes the type of the map. The plan is to have a wide range of types, including hashed arrays, ordinary arrays, bloom filters, and radix trees. The current implementation claims to only support the hash type, but even that implementation is missing from the actual submission. The key_size and value_size parameters tell the code how large the keys and associated values will be, while max_entries puts an upper bound on the number of items that can be stored in a map.

When a call is made to bpf() to create a map, everything in the bpf_attr union beyond the above structure must be set to zero, and size should be the size of the union as a whole. These rules, which apply to all bpf() operations, are enforced in the code; the purpose is to allow the addition of more information to this union to support future enhancements to BPF functionality. If new fields are added, newer applications can provide the needed information. Older applications, instead, will have to pass zeroes in those fields, so the right thing will happen.

Upon successful creation of a map, the return value from bpf() will be an open file descriptor which can be used to refer to that map.

There is a set of commands to operate on individual entries in a map; they all use this structure within the bpf_attr union:

    struct { /* anonymous struct used by BPF_MAP_*_ELEM commands */
	__u32             map_fd;
	__aligned_u64     key;
	union {
	    __aligned_u64 value;
	    __aligned_u64 next_key;
	};
    };

For all operations, map_fd is the file descriptor referring to the map to be used, and key is a pointer to the key of interest. To store an item in the map, the BPF_MAP_UPDATE_ELEM command should be used; in this case, value should be a pointer to the data to be stored. To look up an item, use BPF_MAP_LOOKUP_ELEM; if the item is present in the map, its value will be stored in the location pointed to by value. Items can be deleted with BPF_MAP_DELETE_ELEM.

Iterating through a map is done with BPF_MAP_GET_NEXT_KEY; it will return the next key following the provided key. The meaning of "next" is dependent on the type of the map. Should the given key not be found in the map, next_key will be set to the first key in the map, so a typical iteration is likely to be started by calling BPF_MAP_GET_NEXT_KEY with a nonsense key.

Note that there is no command to delete a map. Instead, the program that created the map need only close the associated file descriptor; when all descriptors are closed and no loaded BPF programs reference the map, it will be deleted.

Loading a BPF program into the kernel is accomplished with the BPF_PROG_LOAD command. The relevant structure in this case is:

    struct { /* anonymous struct used by BPF_PROG_LOAD command */
	__u32         prog_type;
	__u32         insn_cnt;
	__aligned_u64 insns;     /* 'const struct bpf_insn *' */
	__aligned_u64 license;   /* 'const char *' */
	__u32         log_level; /* verbosity level of eBPF verifier */
	__u32         log_size;  /* size of user buffer */
	__aligned_u64 log_buf;   /* user supplied 'char *' buffer */
    };

Here, prog_type describes the context in which a program is expected to be used; it controls which data and helper functions will be available to the program when it runs. BPF_PROG_TYPE_SOCKET is used for programs that will be attached to sockets, while BPF_PROG_TYPE_TRACING is for tracing filters. The size of the program (in instructions) is provided in insn_cnt, while insns points to the program itself. The license field points to a description of the license for the program; it may be used in the future to restrict some functionality to GPL-compatible programs.

All programs must pass the BPF verifier as part of the loading process. This verifier is meant to ensure that the program cannot do harm to the system as a whole. It will prevent accesses to arbitrary data, disallow programs that have loops, and more. Should a developer want to know why the verifier is rejecting a program, they can set up a logging buffer of length log_size, pointed to by log_buf. Actually turning on logging is done by setting log_level to a non-zero value.

Note that the "fixup" array found in early versions of the patch set is no longer present. That array indicated the instructions referring to BPF map file descriptors; said instructions were fixed to use internal pointers by the verifier. Current versions of the patch set, instead, define new BPF instructions for map access. The verifier can recognize those instructions directly, so user space is no longer required to point them out.

In the v14 patch set, there is no way to actually attach BPF programs to interesting events once they are loaded. Such features are meant to be added once the basic BPF functionality has gotten through review and found its way into the mainline. That point seems to be getting closer; the developers who have taken an interest in the API seem to be increasingly happy with what they have. A 3.18 merge seems ambitious at this point, but 3.19 might be a real possibility.

Update: this series was accepted into the net-next tree on September 26, so it almost certainly will show up in 3.18.

Comments (7 posted)

Who wrote 3.15 through 3.17

By Jonathan Corbet
September 24, 2014
When writing up the 3.14 development statistics, your editor publicly wondered if compiling those reports for every development cycle made sense. That question was followed by a bit of a break; there were no "who wrote..." articles for the 3.15 or 3.16 development cycles. Now that just over six months have passed and the 3.17 kernel is nearing release, it seems like it may be time to take another look at how the kernel development process is working.

Since 3.14, kernel release activity has looked like this:

Version Date CSets Devs Lines (thousands)
Added Removed Delta
3.15 Jun 8 13,722 1492 1066 707 360
3.16 Aug 3 12,804 1478 578 329 249
3.17 Sep 28* 12,153 1408 692 708 -16
3.15–17 38,679 2546 2336 1744 593

A few interesting things jump out of these numbers. The 3.12 cycle had contributions from 1257 developers. By 3.13, that had increased to 1339, and 3.14 had patches from exactly 1400 developers. So the count of developers contributing to each kernel release, which had hovered in the 1200's for some time, has shown a significant increase. The active kernel development community continues to grow.

The kernel itself also continues to grow, but 3.17 looks like a rare exception. Thanks to the removal of a bunch of unloved code from the staging tree, 3.17 is actually smaller than its predecessor. That has only happened one other time in the history of the Linux kernel; 2.6.36 was smaller than 2.6.35 thanks to the removal of a pile of defconfig files. The overall trend remains unchanged, though; the kernel grew by almost 600,000 lines in the last three releases.

As of 3.17-rc6, Linus was thinking that he would be able to do the 3.17 final release on September 28. Should that schedule hold, the 3.17 kernel will have been produced in a mere 56 days — as was 3.16. Your editor has remarked on the trend of the shortening kernel release cycle for a while. Here is what that trend looks like now (again, assuming the 3.17 release is not delayed):

[Development cycle length chart]

So the kernel development cycle, it seems, continues to get shorter. How much longer that trend can continue is unclear, though; there must be a minimum period required to get a high-quality release together. One other potentially interesting point: it should be remembered that the final stabilization of the 3.15 release overlapped with the 3.16 merge window. That probably had little to do with why the 3.15 cycle took longer than many others; it was the result of some difficult-to-find last-minute bugs. But one could argue that the 3.16 development cycle should really be counted as being one week longer than the release dates would indicate.

Contributors

As can be seen from the table above, 38,679 non-merge changesets were pulled into the mainline repository for the 3.15–3.17 development cycles. Of the 2546 developers who contributed changes during this time, the most active were:

Most active developers, 3.15–3.17
By changesets
Hartley Sweeten9192.4%
Jes Sorensen7672.0%
Malcolm Priestley5441.4%
Fabian Frederick3821.0%
Navin Patidar3781.0%
Laurent Pinchart3300.9%
Sachin Kamat3270.8%
Russell King3160.8%
Axel Lin3010.8%
Johan Hedberg3000.8%
Geert Uytterhoeven2960.8%
Daniel Vetter2780.7%
Takashi Iwai2750.7%
Jingoo Han2650.7%
Thomas Gleixner2600.7%
Alexander Shiyan2400.6%
Ville Syrjälä2350.6%
Joe Perches2330.6%
Tejun Heo2310.6%
Lars-Peter Clausen2260.6%
By changed lines
Tomi Valkeinen31889410.9%
Kristina Martšenko1651025.6%
Larry Finger1648695.6%
Andrzej Pietrasiewicz1080363.7%
Mauro Carvalho Chehab712532.4%
Greg Kroah-Hartman682602.3%
Dave Chinner482671.6%
Devin Heitmueller461251.6%
Malcolm Priestley352311.2%
Jes Sorensen294121.0%
Navin Patidar288711.0%
Hans Verkuil278130.9%
Ben Skeggs262930.9%
Mark Hounschell242850.8%
Ken Cox232130.8%
Hartley Sweeten212460.7%
Jason Cooper203440.7%
Linus Walleij198980.7%
Jake Edge182180.6%
Maxime Ripard146690.5%

As is usually the case, Hartley Sweeten contributed more changesets than any other developer; all of those were against the COMEDI drivers in the staging tree. All told, nearly 6,000 patches have been applied against just that subsystem since its entry into staging. Jes Sorensen's work was nearly all against the rtl8723au driver, while Malcolm Priestly worked on the vt6656 driver; both of those drivers are also in the staging tree. Fabian Frederick contributed cleanups throughout the kernel tree, while Navin Patidar focused on the rtl8188eu driver which, unsurprisingly, is also in the staging tree.

In the "lines changed" column, Tomi Valkeinen reached the top with extensive work on the ARM OMAP architecture code and related device tree files. Kristina Martšenko removed 14 drivers from the staging tree, making her the developer who removed the most code during this time. Larry Finger continues his work to rationalize the Realtek wireless drivers in the staging tree, Andrzej Pietrasiewicz did a lot of work in the USB gadget driver, and Video4Linux subsystem maintainer Mauro Carvalho Chehab did extensive work throughout that tree.

The 3.15–3.17 development cycles saw contributions from at least 312 employers, the most active of whom were:

Most active employers, 3.15–3.17
By changesets
(None)449211.6%
Intel408810.6%
Red Hat35779.2%
(Unknown)34098.8%
Linaro17024.4%
Samsung16464.3%
SUSE12433.2%
IBM10502.7%
(Consultant)10162.6%
Texas Instruments9422.4%
Vision Engraving Systems9192.4%
Google7632.0%
Renesas Electronics7531.9%
Free Electrons7531.9%
Freescale6201.6%
C-DAC4001.0%
Oracle3901.0%
Imagination Technologies3610.9%
NVidia3550.9%
FOSS Outreach Program for Women3360.9%
By lines changed
(None)40817613.9%
Texas Instruments35705812.2%
(Unknown)33876011.6%
Red Hat2592648.8%
Samsung2496138.5%
Intel1808696.2%
Linaro931253.2%
Linux Foundation689882.4%
SUSE522131.8%
(Consultant)459521.6%
IBM448091.5%
Free Electrons429171.5%
Cisco332541.1%
Freescale326361.1%
C-DAC304051.0%
Renesas Electronics299731.0%
Google299571.0%
Realtek278881.0%
NVidia272320.9%
COMPRO Intelligent Solutions247220.8%

As usual, this picture has remained relatively stable from one release to the next. Mildly notable is the increase in contributions from developers working on their own time, though it would be hard to say that the long-term trend toward decreasing volunteer contributions has ended at this point.

Reviews and conclusion

Finally, it can be interesting to look at who is attaching Reviewed-by tags to patches. That tag is meant both as an indicator that the patch has been reviewed and a means for crediting developers who perform those reviews. The developers with the most Reviewed-by tags during this period were:

Developers with the most Reviewed-by tags
Ian Abbott76611.0%
Josh Triplett2073.0%
Tomasz Figa1552.2%
Christoph Hellwig1422.0%
Ville Syrjälä1321.9%
Chris Wilson1231.8%
Johannes Berg1221.8%
Jesse Barnes1031.5%
Guenter Roeck981.4%
Pieter-Paul Giesberts921.3%
David Herrmann871.3%
Dave Chinner861.2%
Hartley Sweeten861.2%
Imre Deak841.2%
Alex Elder841.2%
Rodrigo Vivi801.2%
Alex Deucher741.1%
Damien Lespiau731.1%
Daniel (Deognyoun) Kim711.0%
Franky (Zhenhui) Lin661.0%

Ian Abbott, it seems, has reviewed 766 patches in the 182 days covered by these three development cycles — just over four patches every day, with no breaks for weekends or holidays. It turns out that almost all of those patches were the COMEDI changes submitted by Hartley Sweeten. Josh Triplett, instead, reviewed a wide range of changes from many developers; most of those were changes related to or involving read-copy-update. Tomasz Figa concerns himself with ARM-related changes, Christoph Hellwig is a longstanding reviewer of storage- and filesystem-related patches, and reviews changes to DRM (graphics) drivers.

What is not reflected here, of course, is the vast amount of patch review work that never results in a Reviewed-by tag. In fact, your editor would assert that this mechanism is not working as intended at this point. It is failing to document the bulk of the review work that is being done and serves mostly to highlight which developers make the effort to offer an explicit Reviewed-by tag.

To summarize: what has changed in the six months since LWN last published a set of development statistics? The answer is "not much." The kernel development process continues to roll along, producing releases in a fairly predictable schedule. The pace continues to increase, the community continues to grow, and the development cycle continues to shorten. These are all trends that we have seen for a while, so, to a great extent, it all looks like business as usual.

Comments (6 posted)

Patches and updates

Kernel trees

Linus Torvalds Linux 3.17-rc6 ?
Kamal Mostafa Linux 3.13.11.7 ?

Architecture-specific

Build system

Core kernel code

Development tools

Device drivers

Device driver infrastructure

Documentation

Michael Kerrisk (man-pages) man-pages-3.73 is released ?

Filesystems and block I/O

Memory management

Networking

Miscellaneous

Page editor: Jonathan Corbet

Distributions

Gentoo discusses a Git migration

By Jake Edge
September 24, 2014

Gentoo has been considering (or just discussing) the conversion of its main repositories from CVS to Git for some time now—since 2009, at least. A recent "master plan" posted to the gentoo-dev mailing list resulted in a long, wide-ranging thread. While the discussion was mostly positive on the change, it is still unclear if it will lead Gentoo into making the switch any time soon.

The master plan was posted by Michał Górny in mid-September. He prefaced the plan with a statement of frustration:

I'm quite tired of promises and all that perfectionist non-sense which locks us up with CVS for next 10 years of bikeshed. Therefore, I have prepared a plan how to do git migration, and I believe it's doable in less than 2 weeks (plus the testing). Of course, that assumes infra is going to cooperate quickly or someone else is willing to provide the infra for it.

He describes an ambitious plan, with a seemingly over-optimistic estimate of two hours of downtime to actually perform the switch. Górny envisions three separate repositories, each targeting a different sub-group of Gentoo users. The developer repository is, not surprisingly, for developers. Like any other Git repository, developers would push changes to Gentoo packages into it, and pick up changes from other developers from it.

Changes to the developer repository would then be automatically merged into a "user sync" repository that would target "power users" who want to fetch their Gentoo packages via Git. That repository would be read-only and would be made available to regular users. The user sync repository would also include some "extras", such as documentation files and the cache of MD5 hashes for package metadata.

The contents of the user sync repository would then be used to create the "rsync" repository, which would get the expected ChangeLog and Manifest files. Old ChangeLogs would be checked out of CVS and placed into the rsync repository; moving forward, ChangeLogs would be generated from the Git commit messages. The rsync repository would provide a "no change" option for users who do not want to work with Git, as rsync is an existing mechanism for users to keep their Portage tree up to date.

For the developer repository, Górny would leave all of the CVS history behind, which results in a 66M Git pack file. He is not convinced of the value of the history, nor of the fidelity of the history in the CVS-to-Git conversions that have been done as tests in the past. Furthermore:

You don't need that history most of the time, and you can play with CVS to get it if you really do. In any case, we would likely strip the history anyway to get a small repo to work with.

The loss of history was not entirely popular, but it also may not be necessary. As Rich Freeman pointed out, converting Gentoo's CVS repositories to Git is "basically a solved problem". There is already a process to generate two Git repositories from the existing CVS repositories: one with history and one without.

Freeman agreed with Górny's "sentiment" expressed in the master plan, but he was not sure that the problems identified had not already been solved. In particular, Górny kind of glosses over the "how to use Git" question. As Freeman put it: "there are a dozen different ways we COULD use git, and nobody has picked the ONE way we WILL use it". As might be guessed, there are lots of different opinions about the right way for Gentoo developers to use Git. In the thread, that led to some of the bikeshedding that Górny was worried about.

But Julian Ospald (aka "hasufell") has been working on a step-by-step guide (also on the Gentoo wiki) that may help focus the Git workflow discussion. In another message, he was optimistic that such a guide can be worked up in two or three weeks.

Another major theme of the discussion was concern over the security implications of Git's use of the SHA-1 hash. The plan is to GPG-sign some commits to the developer repository, so there were questions about the security of coupling GPG signatures and SHA-1 hashes. But, as several in the thread pointed out, Git only uses SHA-1 as a consistency check, rather than directly as a security feature. It was also pointed out that adversaries who can create SHA-1 collisions probably have much easier ways to compromise Gentoo's repositories—including simply becoming a Gentoo developer and committing the code directly.

It would seem that the Gentoo infrastructure team is not yet ready to commit the resources that Górny has requested—at least not publicly in the thread. Freeman noted that he didn't see it as a lack of cooperation from the team, "just lack of manpower or interest". There was at least one offer of server resources to use for testing, but nothing "official" has so far been seen.

Even if there are no server resources yet, it would seem that some progress has been made. Working out the Git workflow, as well as the repository structure, will be helpful whenever the conversion does come about. Given the level of interest (and the lack of features in the ancient CVS tool), it would seem that the conversion could come about relatively soon. On the other hand, there have been other times in Gentoo history where it looked like the conversion was near at hand (notably in 2011), so we will have to wait and see.

Comments (8 posted)

Brief items

Announcing the release of Fedora 21 Alpha

The Fedora project has released Fedora 21 Alpha. This is the first release of Fedora.next, which introduces three products rather than the traditional single deliverable. The Fedora 21 Base includes only the base set of packages (such as kernel, RPM, yum, systemd, and Anaconda) used by all the products. Fedora 21 Cloud includes images for use in private cloud environments like OpenStack, as well as AMIs for use on Amazon, and a new image streamlined for running Docker containers. The server product is aimed at making it easier to install discrete infrastructure services. The Fedora Server will introduce three new technologies in Fedora to handle this task, rolekit, Cockpit and OpenLMI. The third product is Fedora 21 Workstation, which is aimed at providing a platform for development of server side and client applications that is attractive to developers of all stripes. The final release of Fedora 21 is expected in December.

Full Story (comments: 41)

LFS and BLFS Version 7.6 released

The Linux From Scratch community has announced the release of LFS 7.6, BLFS 7.6, LFS Systemd 7.6, and BLFS Systemd 7.6. The LFS releases include toolchain updates. BLFS (Beyond Linux From Scratch) includes about 750 packages beyond LFS and includes many updates.

Full Story (comments: 1)

openSUSE 13.2 beta released

The openSUSE project has released the first beta for openSUSE 13.2. The beta includes Linux kernel 3.16, GNOME 3.12, Plasma Workspaces 4.11, KDE applications 4.13, Plasma 5.1, Frameworks 5.2, all of which are likely to be updated before the final release. Btrfs is the default filesystem. YaST has a revamped installer and many other improvements. There's plenty to test in this release.

Comments (none posted)

Oracle Linux Release 5 Update 11

Oracle has released version 5.11 of their Enterprise Linux distribution. Three kernel packages are available in this release. Oracle's Enterprise Kernel is booted by default. The second kernel is Red Hat compatible and is installed by default. The third kernel is also Red Hat compatible, but also includes additional bug fixes added by Oracle, and it must be manually installed.

Full Story (comments: none)

Whonix 9 released

Whonix Anonymous Operating System Version 9 has been released. "Whonix is an operating system focused on anonymity, privacy and security. It’s based on the Tor anonymity network, Debian GNU/Linux and security by isolation. DNS leaks are impossible, and not even malware with root privileges can find out the user’s real IP. Whonix consists of two parts: One solely runs Tor and acts as a gateway, which we call Whonix-Gateway. The other, which we call Whonix-Workstation, is on a completely isolated network. Only connections through Tor are possible." The announcement contains a lengthy changelog between version 8 and version 9.

Comments (none posted)

Distribution News

Debian GNU/Linux

Bug-Squashing-Party in Munich, Germany

There will be a Bug-Squashing-Party in Munich, Germany beginning on Friday evening, November 21, and continuing through the weekend.

Full Story (comments: none)

Newsletters and articles of interest

Page editor: Rebecca Sobol

Development

Mailpile's first beta release

By Nathan Willis
September 24, 2014

The Mailpile project made quite a news splash in 2013, capitalizing on public anger over the government Internet surveillance disclosed by Edward Snowden, and launching a successful Indiegogo campaign to fund development. What Mailpile promised was a simple-to-use webmail experience that users could self host: all the convenience of GMail, but none of the ads, user-tracking, or spying eyes. Now, the project has announced its first beta release. The good news is that the fundamental email features are in place. The security and privacy features are also nearing completion—although, naturally, users should be wary of over-reliance on pre-release software for such matters.

Piling on

The beta was announced on September 13, with pre-built packages made available for Windows and Mac OS X, and a tagged release on GitHub available for Linux. The tag, interestingly enough, designates the release as version 0.4.0, although there does not appear to be a detailed roadmap between here and an eventual 1.0 release, which the release notes estimate will arrive in December.

[Mailpile inbox]

The release includes a guided set-up process, but those interested in only taking a peek may prefer to check out the live demo running at www.mailpile.is/demos (for the curious, the screen shots shown here come from the live demo, rather than from the author's personal email). Installing the Mailpile beta locally requires OpenSSL, GnuPG, Python 2, and a handful of common Python libraries, but no external web server is required. Launching Mailpile opens the user interface running at http://localhost:33411.

We last looked at Mailpile just over a year ago, shortly after the project's public debut. At that time, the team—Bjarni Einarsson, Smári McCarthy, and Brennan Novak—pitched Mailpile as "personal web-mail." That is, an application that offered the ease-of-use (both within the interface and on administrative tasks) that contributes to the wide popularity of webmail services like GMail, but is private, decentralized, and offers security that a commercial service cannot match.

The original brief for Mailpile also specifies that the application will be implemented in HTML and JavaScript, running from a local web server, where it can remain under the user's control. Nevertheless, Mailpile itself does not handle the more security-sensitive tasks of sending and receiving mail: it requires either a separate mail server running on the local machine, or a POP/IMAP account on a remote host. At this point, the beta is quite simple to set up and get started with (at least when used with a remote email server).

It remains to be seen, though, whether or not the same degree of smoothness can be extended to include setting up local mail receipt and delivery. Considering Mailpile's public focus on the importance of user security and privacy, it is a bit odd to see its continued reliance on remote mail servers.

Usability

But, considering how complex some of the steps involved could be, Mailpile's guided setup and configuration process is remarkably smooth. During initial setup, users are asked to create an encryption key and passphrase that will be used to protect storage (but is not, for example, used for signing outgoing messages or decrypting incoming ones), and similar walk-throughs step through the process of setting up SMTP, POP, and IMAP configurations (which are, perhaps confusingly, called "routes" in the interface).

[Mailpile message reply]

The user interface, on the whole, is definitely an improvement over the default UIs found in other common free-software webmail packages (such as SquirrelMail or RoundCube). The icons used are more-or-less self-explanatory and all of the buttons one would require during everyday use are both easy to reach and located close to where they are needed.

That said, there are some aspects of the UI that feel awkward. Icons and functional "action" links vary wildly in size. The "trash" button in the composer window, for instance, is 14 pixels tall, while the "reply" button is 40 pixels tall. Perhaps there is a case to made for varying the size of buttons considerably, but it feels more like a lack of design unity than a conscious choice. Similar inconsistencies are found in color, alignment of UI elements, and whether icons are labeled with text. There are other spots where functionality is simply missing. For instance, when an email thread is opened, every message is shown in collapsed form (with only the first line readable). Clicking on the message expands it, but there seems to be no way to collapse it again.

But, from an interface perspective, the most interesting choices are the conscious decisions, such as Mailpile's decision to eschew "folders" for a single "tag" namespace. An arbitrary decision, some might say, but one that integrates well with the project's emphasis on search as the main method for interacting with a message archive. GMail also took this approach at the beginning, but over the years it strayed away from it with "Priority Inbox," "Important/Not Important," "Categories," multiple flavors of "stars," and other such features that provide different avenues through which to wrangle a busy email account.

Only time will tell whether Mailpile can succeed without also complicating its simple model. Already, the sidebar that lists a user's tags also includes a set of special tags that show all file attachments, all photos (which are also shown by the general "attachments" tag), and all hyperlinks. The last category in particular could become a lengthy list indeed, especially if one subscribes to mailing lists or corresponds with online merchants who liberally sprinkle links into their missives.

Features

Sending and receiving messages works in the beta release, as do attachments, tagging, spam filtering, and basic OpenPGP usage. There is some functionality missing, such as HTML-message formatting, and the release notes point out several hiccups—in particular, when using IMAP (which is still missing several key features, such as synchronization) and when working with attachments other than images. Clicking on any of the "settings" options raises an error, at least on the demo.

Unfortunately, several of the known issues in this beta release relate directly to Mailpile's key feature: end-user security. Basic PGP signing and encryption is supposed to work (although there is an issue when dealing with non-ASCII characters in key IDs), but PGP/MIME support is currently broken. More troublingly, outgoing TLS connections neither validate certificates nor specify strong cipher choices. The automatic PGP-key-lookup function in the contact-editing screen seemed to hang indefinitely in my tests.

But not all is darkness on the security front, according to the project. The team has published a detailed security roadmap staking out its long-term goals and outlining how it intends to reach them. There are some creative and ambitious targets on the list.

[Mailpile key management]

For instance, the user interface can display Gravatar images for remote contacts. The plan is to send HTTP queries for Gravatar images over the Tor anonymizing network in order to guard against snooping. Tor is also planned to be used for masking search engine requests, PGP key lookup, and fetching HTML mail resources. Other goals include support for the Dark Mail protocol, whenever it sees the light of day, and automatic lossless conversion of attachments to "safe" data formats (although the examples listed, such as PDF-to-PostScript, are not explained in detail).

Perhaps the most ambitious security goals, however, are those that come late in the list, such as "implementing a user interface which helps the user avoid making common mistakes" and enabling access from remote locations—including mobile devices. So far, the Mailpile team has done a good job of building a slick webmail-like user interface; building a slick and foolproof PGP interface is at least a different challenge—and likely a harder one, too.

The most practical challenge, however, will be seeing how much of this work the team is able to do by the scheduled 1.0 release date in December. That date, unfortunately, is not merely some arbitrary selection. The project has been operating for the past year using the funds it raised from its crowdsourcing campaign, and the beta announcement estimates that three or four months' worth of money remains. Then again, if the beta proves popular and if the project can show enough progress on the security front prior to running out of cash, that could easily be enough to motivate another successful round of fundraising from Mailpile users.

Comments (5 posted)

Brief items

Quotes of the week

Now, tell me, does a “community ombudsman” rank higher than a “chief cat-herder”? Should I trust the opinion of a “Chief Community Officer” more than a “community gardener”? I can’t tell.
— Dave Neary, responding to Aaron Seigo's recent criticism of "community managers".

I want to thank systemd for my renewed interest in the BSDs.
— Jason Dixon

  • Fire means "Easy to install" because easy is hot!
  • Curve on a monitor is "Cross-platform" because an OS supports monitors!
  • Rocket means "Lightweight" because space travel is inexpensive and has minimal requirements!
  • Empty brackets mean "Open Source" because there is nothing to hide!
— Robert Martinez deciphers some interesting icon choices by the Gogs Git-hosting service.

Comments (1 posted)

PyPy 2.4.0 released

PyPy is an optimized implementation of the Python (2.x) programming language; the 2.4 release is now available. As is often the case, performance improvements top the list of changes in this release. "Benchmarks improved after internal enhancements in string and bytearray handling, and a major rewrite of the GIL handling. This means that external calls are now a lot faster, especially the CFFI ones. It also means better performance in a lot of corner cases with handling strings or bytearrays." Various bug fixes and an update to the Python 2.7.8 standard library are included as well.

Comments (5 posted)

Wayland and Weston 1.6.0 released

The version 1.6.0 releases of the Wayland display manager and Weston compositor are available. Wayland improvements include better error handling and an improved self-testing infrastructure. On the Weston side, they have made a number of xdg-shell protocol changes ("Yes, we broke it again since 1.5.0"), some keyboard repeat improvements, a switch to libinput by default, and more.

Full Story (comments: 37)

Tracker 1.2.0 available

Version 1.2.0 of the Tracker semantic data-storage system has been released. Among the changes are support for new file types, a Data provider feature "to allow 3rd parties to supply their own data to Tracker to be indexed, for example for an online or proprietary service ", and numerous build fixes. Also noteworthy is that "Extractor is now 'crash-aware';" a separate data source is now available for content whose metadata cannot be extracted, a situation that previously would cause repeated failures of tracker-extract, often triggering crashes.

Full Story (comments: none)

GNOME 3.14 released

The GNOME project has released GNOME 3.14. "This is another exciting release for GNOME, and brings many new features and improvements, including multitouch, captive portal support, greatly improved sharing settings. This release also includes improved and redesigned applications for weather, maps, PDF viewing, running VMs, and more. The Wayland support has matured to the point where it is ready for day-to-day use." See the release notes for details.

Full Story (comments: none)

Newsletters and articles

Development newsletters from the past week

Comments (none posted)

Best practices for the new era of open source (opensource.com)

This opensource.com article holds out Ansible as an example of a project worth emulating and delves into the reasons for its success. "The idea that a user can try something out over a lunch break, and understand it—and then learn what is left to learn—is a key success driver for open source software. Too many projects fail needlessly because they don’t invest in this critical idea."

Comments (18 posted)

Hutterer: libinput - a common input stack for Wayland compositors and X.Org drivers

Here's a post from Peter Hutterer on why the X.Org input stack is a mess and the new "libinput" stack is needed. "It looks like a big happy family at first, but then you see that synaptics won't talk to evdev because of the tapping incident a couple of years back, mouse and keyboard have no idea what forks and knives are for, wacom is the hippy GPL cousin that doesn't even live in the same state and no-one quite knows why elographics keeps getting invited. The X server tries to keep the peace by just generally getting in the way of everyone so no-one can argue for too long. You step back, shrug apologetically and say 'well, that's just how these things are, right?'"

Comments (14 posted)

Page editor: Nathan Willis

Announcements

Brief items

FSF: Tor Challenge hits it out of the park

The Free Software Foundation reports that the Electronic Frontier Foundation's Tor Challenge has been a success. "The Tor Challenge has already been successful, but that doesn't mean it's too late to start a Tor relay! You can get started from the Challenge's beautifully-designed Web site."

Full Story (comments: none)

New Books

New From Rocky Nook -- Advanced Software Testing—Vol. 2, 2nd Edition

Rocky Nook has released "Advanced Software Testing—Vol. 2, 2nd Edition" by Rex Black.

Full Story (comments: none)

Calls for Presentations

CFP Deadlines: September 25, 2014 to November 24, 2014

The following listing of CFP deadlines is taken from the LWN.net CFP Calendar.

DeadlineEvent Dates EventLocation
September 30 November 25 New Directions in Operating Systems London, UK
September 30 November 1
November 2
OpenFest 2014 Sofia, Bulgaria
October 1 January 31
February 1
FOSDEM 2015 Brussels, Belgium
October 15 October 29 CentOS Dojo Barcelona, Spain Barcelona, Spain
November 1 April 10
April 12
PyCon North America 2015 Montreal, Canada
November 7 December 5
December 7
SciPy India Bombay, India
November 9 March 21
March 22
LibrePlanet 2015 Cambridge, MA, USA

If the CFP deadline for your event does not appear here, please tell us about it.

Upcoming Events

Events: September 25, 2014 to November 24, 2014

The following event listing is taken from the LWN.net Calendar.

Date(s)EventLocation
September 25
September 26
Kernel Recipes Paris, France
September 26
September 28
PyCon India Bangalore, India
September 27
September 28
EuroBSDCon 2014 Sofia, Bulgaria
October 2
October 3
PyCon ZA 2014 Johannesburg, South Africa
October 3
October 5
PyTexas 2014 College Station, TX, USA
October 4
October 5
Iberian minority language groups reach out to open source Santiago de Compostela, Spain
October 6
October 8
Operating Systems Design and Implementation Broomfield, CO, USA
October 6
October 8
Qt Developer Days 2014 Europe Berlin, Germany
October 6
October 9
Perl::Dancer Conference 2014 Hancock, NY, USA
October 8
October 10
X Developers Conference Bordeaux, France
October 11
October 12
AdaCamp Berlin Berlin, Germany
October 12 Enlightenment Developer Day 2014 Düsseldorf, Germany
October 13
October 15
CloudOpen Europe Düsseldorf, Germany
October 13
October 15
Embedded Linux Conference Europe Düsseldorf, Germany
October 13 Tracing Summit 2014 Düsseldorf, Germany
October 13
October 15
LinuxCon Europe Düsseldorf, Germany
October 14
October 16
KVM Forum 2014 Düsseldorf, Germany
October 15
October 17
Linux Plumbers Conference Düsseldorf, Germany
October 16
October 17
GStreamer Conference Düsseldorf, Germany
October 18
October 19
openSUSE.Asia Summit Beijing, China
October 20
October 21
Tizen Developer Summit Shanghai Shanghai, China
October 21
October 24
PostgreSQL Conference Europe 2014 Madrid, Spain
October 23
October 24
Free Software and Open Source Symposium Toronto, Canada
October 23
October 25
FUDCon Managua 2014 Managua, Nicaragua
October 24
October 25
Firebird Conference 2014 Prague, Czech Republic
October 24
October 25
Seattle GNU/Linux Conference Seattle, WA, USA
October 24
October 26
Ohio LinuxFest 2014 Columbus, Ohio, USA
October 25
October 26
T-DOSE 2014 Eindhoven, Netherlands
October 25
October 28
PyconFR Lyon, France
October 28
October 29
2014 LLVM Developers' Meeting San Jose, CA, USA
October 29 CentOS Dojo Barcelona, Spain Barcelona, Spain
October 31
November 2
Free Society Conference and Nordic Summit Gothenburg, Sweden
November 1
November 2
OpenFest 2014 Sofia, Bulgaria
November 3
November 5
Qt Developer Days 2014 NA San Francisco, CA, USA
November 3
November 7
OpenStack Summit Paris, France
November 4
November 7
Open Source Developers' Conference 2014 Gold Coast, Australia
November 6
November 9
mini-DebConf Cambridge, UK
November 7
November 9
Jesień Linuksowa Szczyrk, Poland
November 8 Open Source Days Copenhagen, Denmark
November 9
November 14
Large Installation System Administration Seattle, WA, USA
November 10
November 14
21'th Annual Tcl/Tk Conference Portland, Oregon, USA
November 11 Korea Linux Forum Seoul, South Korea
November 13 Hackaday Munich Munich, Germany
November 16
November 21
Supercomputing 14 New Orleans, LA, USA
November 17
November 21
ApacheCon Europe Budapest, Hungary
November 18
November 20
Open Source Monitoring Conference Nuremberg, Germany
November 19
November 21
CloudStack Collaboration Conference Europe Budapest, Hungary
November 21
November 23
Debian Bug Squashing Party in Munich Munich, Germany
November 22
November 23
AdaCamp Bangalore Bangalore, India

If your event does not appear here, please tell us about it.

Page editor: Rebecca Sobol


Copyright © 2014, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds