A very important and urgent step to take as early after a security vulnerability is discovered as possible is to notify the community of port users about the jeopardy. Such notification serves two purposes. First, should the danger be really severe it will be wise to apply an instant workaround. E.g., stop the affected network service or even deinstall the port completely until the vulnerability is closed. Second, a lot of users tend to upgrade installed packages only occasionally. They will know from the notification that they must update the package without delay as soon as a corrected version is available.
Given the huge number of ports in the tree a security advisory cannot be issued on each incident without creating a flood and losing the attention of the audience when it comes to really serious matters. Therefore security vulnerabilities found in ports are recorded in the FreeBSD VuXML database. The Security Officer Team members also monitor it for issues requiring their intervention.
If you have committer rights you can update the VuXML database by yourself. So you will both help the Security Officer Team and deliver the crucial information to the community earlier. However, if you are not a committer, or you believe you have found an exceptionally severe vulnerability please do not hesitate to contact the Security Officer Team directly as described on the FreeBSD Security Information page.
The VuXML database is an XML document. Its source file
vuln.xml
is kept right inside the port
security/vuxml
.
Therefore the file's full pathname will be
.
Each time you discover a security vulnerability in a port
please add an entry for it to that file. Until you are
familiar with VuXML, the best thing you can do is to find an
existing entry fitting your case, then copy it and use it as
a template.PORTSDIR
/security/vuxml/vuln.xml
The full-blown XML format is complex, and far beyond the scope of this book. However, to gain basic insight on the structure of a VuXML entry you need only the notion of tags. XML tag names are enclosed in angle brackets. Each opening <tag> must have a matching closing </tag>. Tags may be nested. If nesting, the inner tags must be closed before the outer ones. There is a hierarchy of tags, i.e., more complex rules of nesting them. This is similar to HTML. The major difference is that XML is eXtensible, i.e., based on defining custom tags. Due to its intrinsic structure XML puts otherwise amorphous data into shape. VuXML is particularly tailored to mark up descriptions of security vulnerabilities.
Now consider a realistic VuXML entry:
The tag names are supposed to be self-explanatory so we shall take a closer look only at fields you will need to fill in by yourself:
This is the top-level tag of a VuXML entry. It has
a mandatory attribute, | |
This is a one-line description of the issue found. | |
The names of packages affected are listed there. Multiple names can be given since several packages may be based on a single master port or software product. This may include stable and development branches, localized versions, and slave ports featuring different choices of important build-time configuration options. Important:It is your responsibility to find all such related
packages when writing a VuXML entry. Keep in mind
that
| |
Affected versions of the package(s) are specified
there as one or more ranges using a combination of
In a range specification, The above example specifies that affected are
versions from | |
Several related package groups (essentially, ports)
can be listed in the | |
The version ranges should allow for
| |
This is a summary of the issue. XHTML is used in
this field. At least enclosing
| |
This section contains references to relevant documents. As many references as apply are encouraged. | |
This is a FreeBSD security advisory. | |
This is a FreeBSD problem report. | |
This is a MITRE CVE identifier. | |
This is a SecurityFocus Bug ID. | |
This is a US-CERT security advisory. | |
This is a US-CERT vulnerability note. | |
This is a US-CERT Cyber Security Alert. | |
This is a US-CERT Technical Cyber Security Alert. | |
This is a URL to an archived posting in a mailing
list. The attribute | |
This is a generic URL. It should be used only if none of the other reference categories apply. | |
This is the date when the issue was disclosed
( | |
This is the date when the entry was added
( | |
This is the date when any information in the entry
was last modified
( |
Assume you just wrote or filled in an entry for a
vulnerability in the package clamav
that
has been fixed in version 0.65_7
.
As a prerequisite, you need to
install fresh versions of the ports
ports-mgmt/portaudit
,
ports-mgmt/portaudit-db
,
and
security/vuxml
.
To run packaudit
you must have
permission to write to its
,
typically DATABASEDIR
/var/db/portaudit
.
To use a different directory set the
environment variable to a different location.DATABASEDIR
If you are working in a directory other than
${PORTSDIR}/security/vuxml
set the
environment variable to the directory where
VUXMLDIR
vuln.xml
is located.
First, check whether there already is an entry for this
vulnerability. If there were such an entry, it would match
the previous version of the package,
0.65_6
:
%
packaudit
%
portaudit clamav-0.65_6
If there is none found, you have the green light to add a new entry for this vulnerability.
%
cd ${PORTSDIR}/security/vuxml
%
make newentry
When you are done verify its syntax and formatting.
%
make validate
You will need at least one of the following packages
installed:
textproc/libxml2
,
textproc/jade
.
Now rebuild the portaudit
database
from the VuXML file:
%
packaudit
To verify that the <affected>
section of your entry will match correct package(s), issue
the following command:
%
portaudit -f /usr/ports/INDEX -r uuid
Please refer to portaudit(1) for better understanding of the command syntax.
Make sure that your entry produces no spurious matches in the output.
Now check whether the right package versions are matched by your entry:
%
portaudit clamav-0.65_6 clamav-0.65_7
Affected package: clamav-0.65_6 (matched by clamav<0.65_7)
Type of problem: clamav remote denial-of-service.
Reference: <http://www.freebsd.org/ports/portaudit/74a9541d-5d6c-11d8-80e3-0020ed76ef5a.html>
1 problem(s) found.The former version should match while the latter one should not.
Finally, verify whether the web page generated from the VuXML database looks like expected:
%
mkdir -p ~/public_html/portaudit
%
packaudit
%
lynx ~/public_html/portaudit/74a9541d-5d6c-11d8-80e3-0020ed76ef5a.html
All FreeBSD documents are available for download at http://ftp.FreeBSD.org/pub/FreeBSD/doc/
Questions that are not answered by the
documentation may be
sent to <freebsd-questions@FreeBSD.org>.
Send questions about this document to <freebsd-doc@FreeBSD.org>.