>># man uname
>># uname -r
>># man sysctl
>># sysctl -a | grep kern.osrelease
>Наверно вопрос не понят
>читаю про патчи к системе
>например
>FreeBSD-SA-04:02.shmat
>
>
> Security Advisory
>
>
>
>
>
> The FreeBSD Project
>
>Topic: shmat reference
>counting bug
ошибка при работе с shared memory (man shmat)
>Category: core
категория - ядро системы
>Module: kernel
в самом ядре - kernel
>Announced: 2004-02-05
дата анонса
>Credits: Joost Pol <joost@pine.nl>
благодарность обнаружившему или поправившему
>Affects: All FreeBSD releases
подвержены - ВСЕ релизы
>Corrected: 2004-02-04 18:00:40 UTC (RELENG_4)
исправлено в следующих тегах:
> 2004-02-04 18:00:47 UTC (RELENG_5_2, 5.2-RELEASE-p2)
>
> 2004-02-04 18:00:55 UTC (RELENG_5_1, 5.1-RELEASE-p14)
>
> 2004-02-04 18:01:03 UTC (RELENG_5_0, 5.0-RELEASE-p20)
>
> 2004-02-04 18:01:10 UTC (RELENG_4_9, 4.9-RELEASE-p2)
>
> 2004-02-04 18:01:18 UTC (RELENG_4_8, 4.8-RELEASE-p15)
>
> 2004-02-04 18:01:25 UTC (RELENG_4_7, 4.7-RELEASE-p25)
>CVE Name: CAN-2004-0114
>FreeBSD only: NO
>
>5.1-RELEASE-p14 <<p14>> - что это где посмотреть в системе?
>как определить надо патчить или нет?
научиться читать, вторая ссылка тебе была дана.
хочешь - смотри через указанную ссылку, хочешь - подписывайся на
список рассылки и будешь всегда и своевременно получать сведения
о патчах, какой релиз или stable или current подвержены и что делать.
Выше черным по белому ВСЕ расписано.
Дальше ДЯДЯ будет читать:
I. Background
The System V Shared Memory interface provides primitives for sharing
memory segments between separate processes. FreeBSD supports this
interface when the kernel is built with SYSVSHM option, or the sysvshm
module is loaded. By default, the FreeBSD kernel is built with the
SYSVSHM option.
The shmat(2) system call, which is part of the System V Shared Memory
interface, is used to attach a shared memory segment to the calling
process's address space.
II. Problem Description
A programming error in the shmat(2) system call can result in a shared
memory segment's reference count being erroneously incremented.
III. Impact
It may be possible to cause a shared memory segment to reference
unallocated kernel memory, but remain valid. This could allow a local
attacker to gain read or write access to a portion of kernel memory,
resulting in sensitive information disclosure, bypass of access
control mechanisms, or privilege escalation.
IV. Workaround
NOTE: These workarounds could cause applications that use shared
memory, such as the X Window System, to exhibit erratic behavior or to
fail completely.
Do one of the following:
Вариант Первый:
1) Disable the System V Shared Memory interface entirely by following
these steps:
- Remove or comment out any lines mentioning `SYSVSHM' from your
kernel configuration file, and recompile your kernel as described
in <URL:http://www.freebsd.org/handbook/kernelconfig.html>.
удалите SYSVSHM из ядра и пересоберите его
- Remove or comment out any lines mentioning `sysvshm' from
/boot/loader.conf and /etc/rc.conf.
закоментарьте или удалите из загрузчика или rc.conf (если они есть)
- On FreeBSD 5.x systems only , System V Shared Memory support may
be provided as a kld(4). To be absolutely safe, remove any files
named `sysvshm.ko' in /modules, /boot, and any subdirectories.
для 5.x запретите модульную загрузку sysvshm
- Finally, reboot your system.
Перегрузите систему.
OR
ИЛИ Вариант 2.
2) Configure the System V Shared Memory parameters so that no new
shared memory segments may be created, terminate all processes using
shared memory, and delete all existing shared memory segments. Run
the following commands as root:
# sysctl -w kern.ipc.shmmax=0
# echo 'kern.ipc.shmmax=0' >> /etc/sysctl.conf
# ipcs | awk '/^m/ { print $2 }' | xargs -n 1 ipcrm -m
используя параметры ядра - запретить создание новых сегментов разделяемой
памяти и убить все процессы использующие подобные сегменты и удалить
существующие сегменты.
V. Solution
Решение (наложить security patches):
1) Upgrade your vulnerable system to 4-STABLE, or to the RELENG_5_2,
RELENG_5_1, RELENG_4_9, or RELENG_4_8 security branch dated after the
correction date.
NOTE WELL: Due to release engineering in progress at the time of this
writing, the RELENG_5_2 security branch (5.2-RELEASE-p2)
also includes numerous other critical bug fixes, most of
which are not security related. Please read src/UPDATING
for details on these changes.
1) Произвести вышеуказанные апгрейды ИЛИ
OR
2) Patch your present system:
The following patch has been verified to apply to FreeBSD 4.x and 5.x
systems.
a) Download the relevant patch from the location below, and verify the
detached PGP signature using your PGP utility.
Скачать патчи:
# fetch ftp://ftp.FreeBSD.org/pub/FreeBSD/CERT/patches/SA-04:02/shmat.patch
# fetch ftp://ftp.FreeBSD.org/pub/FreeBSD/CERT/patches/SA-04:02/shmat.patch.asc
b) Apply the patch.
Применить как указано ниже:
# cd /usr/src
# patch < /path/to/patch
c) Recompile your kernel as described in
<URL:http://www.freebsd.org/handbook/kernelconfig.html> and reboot the
system.
Пересобрать ЯДРО и перегрузить систему.
Что тут непонятного?