Become a fan of Slashdot on Facebook

 



Forgot your password?
typodupeerror
×

Comment Re:Either gnu libc is hideously slow and bloated.. (Score 3, Informative) 134

It doesn't mean you can't use gdb, just that libc itself does not try to double as a debugging tool. This is actually a security consideration. For example, glibc prints debugging information if it detects corruption in malloc. But if there's already memory corruption, you have to assume the whole program state is inconsistent; the corruption may be intentional due to the actions of an attacker, and various function pointers, etc. may have been overwritten. Continuing execution, even to print debug output, risks expanding the attacker's opportunity to take control of the program.

FWIW, musl does detect heap corruption. The difference is that it immediately executes an instruction that will crash the program rather than trying to continue execution, make additional function calls that go though indirection (the PLT) and access complex data structures, etc.

Comment Re:Reinventing GPL wheels (Score 3, Insightful) 134

The main effect of glibc being LGPL is not that companies don't use it, rather it's that nobody making non-free software is willing to static-link it, so you end up with versioning hell. glibc partially solves this problem with symbol versioning, but the solution actually makes the problem worse in other cases: for example, in order to provide a binary that runs on systems with older glibc, people making binaries intentionally link against an older glibc, using the outdated/bug-compatible symbol versions instead of the up-to-date ones.

Of course if your goal is to make sure non-free software is always breaking and giving people problems, that's a potential benefit of the LGPL.

With musl, all you have to do to make a binary that works with older versions of the shared libc is avoid using functionality that was introduced in later versions. Or you can just static link and have it work everywhere.

Comment Re:buffer overflow in printf ... great for securit (Score 4, Insightful) 134

Unlike some projects, we fully disclose bugs that might be relevant to security. In this instance, the bug could only be triggered by explicitly requesting sufficiently many decimal places (16445 for ld80) and printing a denormal long double with the lowest bit set, as in:

printf("%.16445Lf", 0x1p-16445);

In addition, even when triggered, it only wrote past the end of the buffer by one slot, and we were unable to get it to overwrite anything important like a return address (of course, what it overwrites depends on the compiler, so in principle it could).

Comment Re:Either gnu libc is hideously slow and bloated.. (Score 4, Informative) 134

At the time the comparison was made, glibc was essentially unmaintained and Debian-based distributions were using the eglibc fork. Now that glibc is under new leadership, eglibc is being discontinued and the important changes have been merged back to glibc upstream. So when I update the chart's quantitative comparisons, it will be for glibc rather than eglibc. The main things that will change when I do are significant increases in size (especially since I seem to have under-measured eglibc's totals) and possibly some improvements in performance. In terms of all the other qualitative comparisons, glibc remains about the same place it was before.

Comment Re:Musl's supported architectures (Score 3, Insightful) 134

We have people working on aarch64, someone interested in doing a sparc port, and interest from the OpenRISC folks in musl too (and I've offered to help them with a port). There's also someone who wants to port to LM32-mmu (which, as I understand it, doesn't have any userspace infrastructure yet and only a very experimental kernel port).

Comment Re:Static linking (Score 1) 3

Yes. These days glibc seems to have "un-deprecated" static linking (they're accepting bug reports for problems that only affect static linking), but it's still something of a second-class citizen. I believe there's still a good deal of pthread breakage, and no attention to making the size of static binaries acceptable.

In musl, I've made efficient and bug-free static linking a priority from the beginning. The empty program isn't quite as small as some of our extreme anti-bloat userbase would like (it's around 1.8k now), but it's still very low compared to anything except dietlibc (which has a number of issues). More interestingly, we can do a static-linked multi-threaded "hello world" in under 4k.

Some figures can be seen in the libc comparison I did back when musl was first released.

Submission + - musl libc hits 1.0 milestone 3

dalias writes: The musl libc project has released version 1.0, the result of three years of development and testing. Musl is a lightweight, fast, simple, MIT-licensed, correctness-oriented alternative to the GNU C library (glibc), uClibc, or Android's Bionic. At this point musl provides all mandatory C99 and POSIX interfaces (plus a lot of widely-used extensions), and well over 5000 packages are known to build successfully against musl.

Several options are available for trying musl. Compiler toolchains are available from the musl-cross project, and several new musl-based Linux distributions are already available (Sabotage and Snowflake, among others). Some well-established distributions including OpenWRT and Gentoo are in the process of adding musl-based variants, and others (Aboriginal, Alpine, Bedrock, Dragora) are adopting musl as their default libc.

Comment Re:Exploit, or dumb users? (Score 1) 105

I wonder if these default passwords printed on labels are generated securely, or if they're a hash of the MAC address or something like that. The latter would be a lot cheaper to implement since there would be no need to install the securely generated passwords on the routers at the factory (they could just generate the password from their MAC on the first boot) and no need to tie this in with the label-printing system.

Comment Re:Exploit, or dumb users? (Score 1) 105

The XSS, etc. only work if the machine you use for browsing is logged in to the router, which is generally a bad idea (for this exact reason). Accessing the router control panel via incognito/private/porn browsing mode when you need it is a good workaround, but of course replacing the firmware with OpenWRT is even better.

Comment Missing the point (Score 2) 742

Nailing MS for bundling IE was like nailing an organized crime lord for tax evasion. Nobody with a clue actually cared about the browser bundling. They cared that Microsoft had been engaging in behavior which essentially amounts to bullying and corruption for the entire time they've existed. The Microsoft that exists now is not reformed; it's just a lot less powerful. It's still part of a very backwards tradition of corporate behavior where you get ahead not by making the best product but by setting up obstacles and shutting down everybody else who's trying to make something better. (See also: entertainment industry, fossil fuels industry, car industry, ...) Corporations which behave that way should be treated like the dinosaurs they are, and shown the door to extinction.

Slashdot Top Deals

Syntactic sugar causes cancer of the semicolon. -- Epigrams in Programming, ACM SIGPLAN Sept. 1982

Working...