LWN: Comments on "Debian changes OpenSSH packaging" https://lwn.net/Articles/991088/ This is a special feed containing comments posted to the individual LWN article titled "Debian changes OpenSSH packaging". en-us Tue, 16 Sep 2025 19:24:38 +0000 Tue, 16 Sep 2025 19:24:38 +0000 https://www.rssboard.org/rss-specification lwn@lwn.net nit https://lwn.net/Articles/994813/ https://lwn.net/Articles/994813/ hauleth <div class="FormattedComment"> <span class="QuotedText">&gt; but documentation on how to interact with systemd outside the actual implementation was lacking</span><br> <p> From what I know it was documented at least since 2019, as at that time I have implemented `sd_notify` in Erlang, and I was using manpages for specification.<br> </div> Sun, 20 Oct 2024 15:18:22 +0000 nit https://lwn.net/Articles/993705/ https://lwn.net/Articles/993705/ turistu <p> except that the abstract unix domain socket "support" in that patch is purely perfunctory -- i.e. it does not work, and hasn't been tested at all. Why was it added in the first place? <p> from the linked <a rel="nofollow" href="https://github.com/openssh/openssh-portable/commit/08f579231cd38a1c657aaa6ddeb8ab57a1fd4f5c#diff-27cc9b899e3f78ce5c43e71ae7a513e0207f7fec0e3237e700ec4d47ab152424R336">patch</a>: <blockquote><pre> if ((path = getenv("NOTIFY_SOCKET")) == NULL || strlen(path) == 0 ... if (strlcpy(addr.sun_path, path, ... /* Support for abstract socket */ if (addr.sun_path[0] == '@') addr.sun_path[0] = 0; ... if (connect(fd, &amp;addr, sizeof(addr)) != 0) { </pre></blockquote> Assuming that <code>NOTIFY_SOCKET</code> is <code>"@/foo"</code> that will not connect to the abstract unix socket with the address <code>"\0/foo"</code> (as intended) but to the one with the address <code>"\0/foo\0\0\0...+ other 100 null bytes"</code>. <p> And btw, why doing a <code>connect()</code> + <code>write()</code> on a <i>single-use</i> datagram socket instead of a simple <code>sendto()</code>? <p> Also, is <code>close(-1)</code> undefined behaviour that should be checked against? Fri, 11 Oct 2024 02:59:53 +0000 patch vs package https://lwn.net/Articles/992649/ https://lwn.net/Articles/992649/ nim-nim <div class="FormattedComment"> &gt; They're volunteers with limited time, resources, and skill sets. They never audit the packages they download, and don't understand the software's architecture enough to understand the full impact or implications of changes 3rd party patches introduce.<br> <p> In my experience, many upstreams vendor third-party code without understanding its architecture or reviewing its code, and many upstreams then patch this vendored code without understanding the implications.<br> <p> If that looks like how distro packager work that’s exactly like it. What upstreams that vendor and fork severely dislike is all the QA processes of a big distro that are used to detect when third party code use is problematic.<br> </div> Wed, 02 Oct 2024 13:13:30 +0000 re: nit https://lwn.net/Articles/992205/ https://lwn.net/Articles/992205/ grawity No, the entirety of libsystemd used to be standalone from the beginning – it was originally shipped as a self-contained <code><a href="https://github.com/systemd/systemd/blob/v30/src/sd-daemon.c">sd-daemon.{c,h}</a></code> intended to be copy-pasted (whole or in parts) into one's own project, for about a year before it became a shared library in ~2011. Mon, 30 Sep 2024 09:02:29 +0000 Thanks for integrating based on a protocol rather than dependencies https://lwn.net/Articles/992203/ https://lwn.net/Articles/992203/ cortana <div class="FormattedComment"> ... which has been documented in sd_notify(3) since systemd v1!<br> </div> Mon, 30 Sep 2024 08:40:44 +0000 patch vs package https://lwn.net/Articles/992198/ https://lwn.net/Articles/992198/ LtWorf <div class="FormattedComment"> Ah, the ever present upstream developers are genetically better than people who do packages.<br> <p> Unless you have some serious source that shows that patches from distributions introduce more issues than there are at large in all software, I think this line of thought isn't very useful.<br> </div> Mon, 30 Sep 2024 07:30:21 +0000 Thanks for integrating based on a protocol rather than dependencies https://lwn.net/Articles/992197/ https://lwn.net/Articles/992197/ LtWorf <div class="FormattedComment"> The "protocol" is a static string to send over a socket.<br> </div> Mon, 30 Sep 2024 07:27:06 +0000 gsskex or gssauth? https://lwn.net/Articles/992117/ https://lwn.net/Articles/992117/ grawity <div class="FormattedComment"> The article seems to be muddling up two different facets of GSS-API support. One mode (gssapi-with-mic) which has been upstream for years, and another mode (gssapi-keyex) which Debian keeps patching in downstream.<br> <p> Both use the exact same GSS-API (and therefore both are equally "Kerberos"), only Debian's patch does it much earlier (in place of host auth) so it is considered more risky than the upstream support (which works only as user authentication).<br> <p> So it doesn't make any sense to say that "OpenSSH added GSS-API in 2003 but refuses to add Kerberos support" because GSS-API and Kerberos are for all intents and purposes the same feature; what OpenSSH refuses to add is the ability to use it at an earlier time during the connection.<br> <p> Likewise a package that doesn't contain the Debian gsskex patch would not, by any means, be a "non-GSS-API" package – unless the built-in support gets caught in the crossfire and disabled as well (for guilt by association or something).<br> </div> Sun, 29 Sep 2024 04:42:05 +0000 nit https://lwn.net/Articles/992113/ https://lwn.net/Articles/992113/ intelfx <div class="FormattedComment"> <span class="QuotedText">&gt; I'm pretty sure that standalone version was in fact added by bluca in response to discussions on this very website?</span><br> <p> The sample implementation in the manpage itself — yes, was added very recently.<br> <p> But even the very first version of the sd_notify(3) manpage was clearly saying that a reference implementation, designed for vendoring into other projects (and thus written to C89 standards without any extensions), was maintained in src/sd-daemon.[ch] within systemd sources (300 SLOC, of which the majority were attributable to other functions that had no bearing on sd_notify() itself and could be left out if not needed).<br> </div> Sat, 28 Sep 2024 20:01:44 +0000 nit https://lwn.net/Articles/992112/ https://lwn.net/Articles/992112/ atnot <div class="FormattedComment"> I'm pretty sure that standalone version was in fact added by bluca in response to discussions on this very website?<br> <p> But nevertheless, I did implement it myself in python around 2020 and don't think I had to try very hard. So clearly it wasn't impossible to figure this out, that seems ahistorical to me. Especially since to my memory the original discussions about integrating sd-notify were rejected primarily on grounds of "double fork is fine" and "systemd bad" rather than some concern for adding one more linker entry being a deal breaker.<br> </div> Sat, 28 Sep 2024 19:53:58 +0000 patch vs package https://lwn.net/Articles/992105/ https://lwn.net/Articles/992105/ ballombe <div class="FormattedComment"> I suppose it depends on the distribution and the package.<br> The article does not give the impression that this applies to the Debian OpenSSH package maintainers.<br> In my field almost all Debian maintainers are also upstream of related packages.<br> </div> Sat, 28 Sep 2024 18:11:47 +0000 nit https://lwn.net/Articles/992104/ https://lwn.net/Articles/992104/ intelfx <div class="FormattedComment"> <span class="QuotedText">&gt; We would have done it sooner if there was a published specification for the interface, but documentation on how to interact with systemd outside the actual implementation was lacking.</span><br> <p> This is pretty disingenuous.<br> <p> The sd_notify interface was stable since it was first ever documented in 2010, and systemd had *always* offered a standalone implementation of that protocol that was supposed to be imported into other projects's sources.<br> </div> Sat, 28 Sep 2024 16:55:49 +0000 patch vs package https://lwn.net/Articles/992100/ https://lwn.net/Articles/992100/ ballombe <div class="FormattedComment"> Refactoring and maintainance are the work of the patch author/maintainer, not of the distribution carrying it.<br> It may happen that the author is one of distribution developer, but this is incidental to the point I tried to make unsuccessfuly.<br> Consider the difference between carrying a patch and packaging a fork that includes the patch.<br> </div> Sat, 28 Sep 2024 15:32:54 +0000 Thanks for integrating based on a protocol rather than dependencies https://lwn.net/Articles/992094/ https://lwn.net/Articles/992094/ fredrik <div class="FormattedComment"> Feels like stating the obvious here, but: Thank you for using that approach in OpenSSH.<br> <p> Using a protocol rather than calling a function in a library dependency is of course an excellent way to isolate the calling code from any vulnerabilities or other problems in a library implementation or its transitive dependencies.<br> <p> In this case, when the protocol is trivial, it is also an easy choice. Or at least it became trivial once the protocol was documented. Before then, perhaps the most obvious way was to use libsystemd? Just because no other option was apparent.<br> <p> Anyway, it seems to be a good strategy to reduce attack vectors for vulnerabilities, to prefer integration based on protocols over added library dependencies.<br> </div> Sat, 28 Sep 2024 11:56:04 +0000 patch vs package https://lwn.net/Articles/992089/ https://lwn.net/Articles/992089/ Heretic_Blacksheep <div class="FormattedComment"> How many package maintainers actually help maintain the software beyond some relatively superficial patch sets? My experience in interacting with packagers is that many of are trusting to upstream, adding whatever patches necessary to function and build in their distribution's build and runtime environment, and that's about it. They're volunteers with limited time, resources, and skill sets. They never audit the packages they download, and don't understand the software's architecture enough to understand the full impact or implications of changes 3rd party patches introduce. On top of that, a lot of software has become so complex no single packager can fully understand the code logic of larger projects even if they're part of the upstream team.<br> <p> There are certainly exceptions to the above, but for the most part, people are effectively just doing the distribution's equivalent to creating a spec file, doing rpmbuild, uploading to the test server, call it a day hoping that someone using the test level packages uses the software to test the patches before they trickle into stable/LTS deployment.<br> </div> Sat, 28 Sep 2024 08:35:20 +0000 patch vs package https://lwn.net/Articles/992088/ https://lwn.net/Articles/992088/ smurf <div class="FormattedComment"> Well, not exactly. The amount of additional work you need to do when Upstream decides to refactor their code differs by at least an order of magnitude. Also patches might introduce security problems or other bugs that don't exist in the original package, or worse got introduced inadvertently by an upstream change that by itself would be perfectly safe.<br> </div> Sat, 28 Sep 2024 08:11:36 +0000 patch vs package https://lwn.net/Articles/992086/ https://lwn.net/Articles/992086/ ballombe <div class="FormattedComment"> Carrying a patch is exactly the same as carrying a package. You do it because it serves (a subset of) yours users.<br> Sure you need to maintain it and provide security support, but it is also the case for a package.<br> <p> </div> Sat, 28 Sep 2024 07:05:30 +0000 GSSAPI key exchange https://lwn.net/Articles/992083/ https://lwn.net/Articles/992083/ buck <div class="FormattedComment"> Just have to say that I am extremely grateful for Simon Wilkinson's patch and his work making it available, for Colin Watson carrying it so many years for Debian, in league with the Red Hat devs, and for the commitment to carry it onward for however long he does.<br> <p> Within the "enterprise" computing environment where Kerberos gained sway back in the early aughts, to have PuTTY (then with a patch from Vintela, which then became Quest) be able to passwordlessly authenticate one to a Linux host, without having to worry about SSH host keys or users' authorized_keys, was a game-changer. And it still connects us to our Linux hosts' remote desktop sessions to this day, with Simon Tatham having integrated the gsskex functionality into PuTTY itself not too long ago:<br> <p> <a href="https://www.chiark.greenend.org.uk/~sgtatham/putty/wishlist/gss-key-exchange.html">https://www.chiark.greenend.org.uk/~sgtatham/putty/wishli...</a><br> <p> Granted, we are sitting behind many layered defenses and our servers don't offer up preauth attack surface to the pounding that sshd gets, day in and day out, other places, so I would concede that the OpenSSH developers and DJM in particular have perhaps indeed had better things to do over the years than adding such a sizable chunk of code to their preauth concerns. And I am extremely grateful to them and especially DJM's porting efforts, for making SSH synonymous with remote access, and, arguably (though I am not trying to start an argument), playing a crucial part in Linux' rise to dominance as *the* (container) hosting platform, though I guess the OpenBSD guys might think that a backhanded compliment.<br> </div> Sat, 28 Sep 2024 04:32:08 +0000 nit https://lwn.net/Articles/992071/ https://lwn.net/Articles/992071/ Cyberax <div class="FormattedComment"> <span class="QuotedText">&gt; we've accepted almost everything that they've proposed.</span><br> How about MPTCP?<br> </div> Fri, 27 Sep 2024 20:51:43 +0000 nit https://lwn.net/Articles/992067/ https://lwn.net/Articles/992067/ bluca <div class="FormattedComment"> Yes, that's correct, most generalist distributions patched it to use libsystemd to fix certain issues, for many years. After the xz exploit we started pushing again to get the patch upstream (the bugzilla ticket about this had been open for years too), open coding the integration instead of using libsystemd, and this was merged.<br> </div> Fri, 27 Sep 2024 20:03:35 +0000 SELinux integration https://lwn.net/Articles/992061/ https://lwn.net/Articles/992061/ hmh <div class="FormattedComment"> Apparently, so that the client can specify the desired SELinux role for an user that is allowed multiple roles.<br> <p> <a href="https://salsa.debian.org/ssh-team/openssh/-/blob/master/debian/patches/selinux-role.patch?ref_type=heads">https://salsa.debian.org/ssh-team/openssh/-/blob/master/d...</a><br> <p> </div> Fri, 27 Sep 2024 18:58:05 +0000 nit https://lwn.net/Articles/992045/ https://lwn.net/Articles/992045/ jzb Sorry - wasn't that _after_ the XZ incident, though? Perhaps I should've written "Debian OpenSSH <em>had been</em> patched" or something similar to make that clearer? Fri, 27 Sep 2024 15:46:11 +0000 SELinux integration https://lwn.net/Articles/992036/ https://lwn.net/Articles/992036/ DemiMarie <div class="FormattedComment"> Why does OpenSSH need SELinux integration beyond what PAM does?<br> </div> Fri, 27 Sep 2024 14:32:58 +0000 nit https://lwn.net/Articles/992034/ https://lwn.net/Articles/992034/ djm <blockquote><em>OpenSSH was patched so that it could notify systemd when it was ready to accept connections, using the libsystemd library</em></blockquote> <p>Nit: we patched OpenSSH to notify systemd <a href="https://github.com/openssh/openssh-portable/commit/08f579231cd38a1c657aaa6ddeb8ab57a1fd4f5c">without</a> using the libsystemd library. We would have done it sooner if there was a published specification for the interface, but documentation on how to interact with systemd outside the actual implementation was lacking.</p> <p>That aside, we really welcome Debian's work to upstream their changes - we've accepted almost everything that they've proposed.</p> Fri, 27 Sep 2024 14:17:41 +0000