libcap-ng does not handle the addition of new capabilities gracefully. So far, I've found the following issues:
1. CAP_LAST_CAP is exposed in cap-ng.h. cap-ng.h should instead expose a function or an extern const int that is set at runtime. This makes looping over all capabilities work poorly. (/proc/sys/kernel/cap_last_cap is there for exactly this reason.)
2. capng_capability_to_name returns null (often causing segfaults) when the input parameter isn't in the lookup table. It could return something more clever like "cap_%d" with %d filled in appropriately. (Leaking a few bytes per unknown capability number wouldn't be so bad -- it's a bounded leak.)
3. capng_name_to_capability can't parse names that aren't in the lookup table.
(2 and 3 would be greatly improved if there was a way to ask the kernel for the names of capabilities.)
4. CAP_LAST_CAP is a compile-time constant in cap-ng.c, meaning that many things are likely to break if new capabilities are added.
A stopgap measure would be to just fix #1 so that a mismatch between header and library version won't cause problems.
Hmm...I didn't know about that proc entry. I'll see what I can do. I can likely do something with #2, but not #3. Thanks for pointing out the proc entry. The audit system and strace would have the same issues on interpreting unknown capabilities.
Allowing capng_name_to_capability to parse cap_<number> is probably the best that can be done about #3.
This message is a reminder that Fedora 17 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 17. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora
'version' of '17'.
Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version prior to Fedora 17's end of life.
Bug Reporter: Thank you for reporting this issue and we are sorry that
we may not be able to fix it before Fedora 17 is end of life. If you
would still like to see this bug fixed and are able to reproduce it
against a later version of Fedora, you are encouraged change the
'version' to a later Fedora version prior to Fedora 17's end of life.
Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.
Still planning to make some changes...moving to rawhide.
This now fixed in SVN and will be in libcap-ng-0.7.4.
A new package was released fixing this.