Oracle LinuxKsplice User's Guide - E39380
Oracle LinuxKsplice User's Guide - E39380
Oracle LinuxKsplice User's Guide - E39380
E39380-43
May 2020
Oracle Legal Notices
This software and related documentation are provided under a license agreement containing restrictions on use and
disclosure and are protected by intellectual property laws. Except as expressly permitted in your license agreement
or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute,
exhibit, perform, publish, or display any part, in any form, or by any means. Reverse engineering, disassembly, or
decompilation of this software, unless required by law for interoperability, is prohibited.
The information contained herein is subject to change without notice and is not warranted to be error-free. If you find
any errors, please report them to us in writing.
If this is software or related documentation that is delivered to the U.S. Government or anyone licensing it on behalf of
the U.S. Government, then the following notice is applicable:
U.S. GOVERNMENT END USERS: Oracle programs (including any operating system, integrated software, any
programs embedded, installed or activated on delivered hardware, and modifications of such programs) and
Oracle computer documentation or other Oracle data delivered to or accessed by U.S. Government end users are
"commercial computer software" or "commercial computer software documentation" pursuant to the applicable
Federal Acquisition Regulation and agency-specific supplemental regulations. As such, the use, reproduction,
duplication, release, display, disclosure, modification, preparation of derivative works, and/or adaptation of i) Oracle
programs (including any operating system, integrated software, any programs embedded, installed or activated
on delivered hardware, and modifications of such programs), ii) Oracle computer documentation and/or iii) other
Oracle data, is subject to the rights and limitations specified in the license contained in the applicable contract. The
terms governing the U.S. Government's use of Oracle cloud services are defined by the applicable contract for such
services. No other rights are granted to the U.S. Government.
This software or hardware is developed for general use in a variety of information management applications. It is not
developed or intended for use in any inherently dangerous applications, including applications that may create a risk
of personal injury. If you use this software or hardware in dangerous applications, then you shall be responsible to
take all appropriate fail-safe, backup, redundancy, and other measures to ensure its safe use. Oracle Corporation
and its affiliates disclaim any liability for any damages caused by use of this software or hardware in dangerous
applications.
Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their
respective owners.
Intel and Intel Inside are trademarks or registered trademarks of Intel Corporation. All SPARC trademarks are used
under license and are trademarks or registered trademarks of SPARC International, Inc. AMD, Epyc, and the AMD
logo are trademarks or registered trademarks of Advanced Micro Devices. UNIX is a registered trademark of The
Open Group.
This software or hardware and documentation may provide access to or information about content, products, and
services from third parties. Oracle Corporation and its affiliates are not responsible for and expressly disclaim all
warranties of any kind with respect to third-party content, products, and services unless otherwise set forth in an
applicable agreement between you and Oracle. Oracle Corporation and its affiliates will not be responsible for any
loss, costs, or damages incurred due to your access to or use of third-party content, products, or services, except as
set forth in an applicable agreement between you and Oracle.
Abstract
This guide provides information about using Ksplice to update a running system without the need to reboot the
system.
iii
Oracle® Linux
iv
Preface
Oracle® Linux: Ksplice User's Guide provides information about how to install, configure, and use Oracle
Ksplice to update kernel, userspace, and Xen hypervisor packages on a running system and how to use
the Ksplice Uptrack API.
Audience
This document is intended for administrators who need to configure Oracle Ksplice on Oracle Linux
systems. It is assumed that readers are familiar with and have a general understanding of Linux system
administration.
Document Organization
The document is organized as follows:
• Chapter 2, Working With the Ksplice Enhanced Client provides information about installing and
configuring the Ksplice Enhanced client and applying updates to a running system.
• Chapter 3, Working With Ksplice Uptrack provides information about installing and configuring the
Ksplice Uptrack client and applying updates to a running system.
• Chapter 4, Working With the Ksplice Uptrack API describes how to use the Ksplice Uptrack API.
Related Documents
The documentation for this product is available at:
https://docs.oracle.com/en/operating-systems/linux.html.
Conventions
The following text conventions are used in this document:
Convention Meaning
boldface Boldface type indicates graphical user interface elements associated with an
action, or terms defined in text or the glossary.
italic Italic type indicates book titles, emphasis, or placeholder variables for which
you supply particular values.
monospace Monospace type indicates commands within a paragraph, URLs, code in
examples, text that appears on the screen, or text that you enter.
Documentation Accessibility
For information about Oracle's commitment to accessibility, visit the Oracle Accessibility Program website
at
https://www.oracle.com/corporate/accessibility/.
v
Access to Oracle Support
https://www.oracle.com/corporate/accessibility/learning-support.html#support-tab.
vi
Chapter 1 About Oracle Ksplice
Table of Contents
1.1 Overview of Oracle Ksplice ........................................................................................................... 1
1.1.1 Supported Kernels ............................................................................................................. 2
1.1.2 About Ksplice Updates ....................................................................................................... 3
1.1.3 Patching and Updating Your System .................................................................................. 4
1.1.4 Using Ksplice With Oracle Enterprise Manager ................................................................... 5
1.2 About Ksplice Client Software ....................................................................................................... 5
1.2.1 About the Ksplice Enhanced Client ..................................................................................... 5
1.2.2 About the Ksplice Uptrack Client ........................................................................................ 6
1.3 Preparing to Use Oracle Ksplice ................................................................................................... 7
1.3.1 Choosing a Ksplice Client .................................................................................................. 7
1.3.2 About Oracle Ksplice and ULN Registration ........................................................................ 7
1.3.3 Available Ksplice Channels ................................................................................................ 8
1.3.4 Configuring a Local ULN Mirror to Act as a Ksplice Mirror .................................................... 8
1.3.5 Configuring an Oracle Linux 7 Spacewalk Server to Act as a Ksplice Mirror .......................... 9
This chapter provides a high-level overview of Oracle Ksplice, including tasks that you might need to
perform in preparation for using Ksplice in Oracle Linux.
Note
Some of the instructions and examples in this document apply to multiple Oracle
Linux releases. The examples use the yum command for compatibility with several
supported versions of Oracle Linux. If you are running Oracle Linux 8, you may opt
to use the dnf command, as appropriate.
The majority of the installation and configuration instructions in this guide apply
only to Oracle Linux releases. If you plan to use Oracle Ksplice to patch the
Xen hypervisor on Oracle VM Server 3.4.5, and later releases, refer to the
documentation for the Oracle VM release that you are running for step-by-step
instructions. For example, if you are running Oracle VM 3.4.5, see Updating Oracle
VM Server With Oracle Ksplice in the Oracle VM Administration Guide for Release
3.4.
Linux systems receive regular security updates to core operating system components that necessitate
patching and rebooting. Traditionally, applying such updates would require you to obtain and install the
updated RPMs, schedule downtime, and reboot the server to the new package version, with any critical
updates. However, as system setups become more complex, with many interdependencies, access to
services and applications must remain as undisrupted as possible, as scheduling such reboots becomes
more difficult and costly.
Ksplice provides a way for you to keep your systems secure and highly available by enabling you to update
the running systems with the latest kernel and key user-space security and bug fix updates, as well as Xen
hypervisor updates on Oracle VM Server 3.4.5, and later.
1
Supported Kernels
Note
When using Ksplice to patch the Xen hypervisor on Oracle VM Server 3.4.5 and
later, the minimum version that is required is xen-4.4.4-196.el6.x86_64.rpm.
Ksplice updates the running operating system without requiring a reboot. Your systems remain up to date
with OS vulnerability patches and downtime is minimized. A Ksplice update takes effect immediately upon
application, which is different than an on-disk change that requires a subsequent reboot to take effect.
However, note that on-disk updates are still required, even when using Ksplice, to ensure that package
binaries are updated to the most recent version and can be used in the event that the system or processes
are restarted. On-disk updates are handled by subscribing to Unbreakable Linux Network (ULN) or by
using a local ULN mirror.
Oracle creates each Ksplice update from a package update that originates either from Oracle or from the
open source community.
2
About Ksplice Updates
Note
If your system is currently running Red Hat Enterprise Linux (RHEL) and you
recently migrated to Oracle Linux Premier Support, you can use Ksplice to
update the existing RHEL kernel. You do not need to switch to RHCK to use
Ksplice kernel patches. These patches are available on ULN as uptrack-
updates-kernel_version packages in the Ksplice for Oracle Linux channels.
3
Patching and Updating Your System
Per the previous figure, when a critical bug or security vulnerability is discovered in the Linux kernel, Oracle
produces a new kernel release and prepares a rebootless update corresponding to that release. The
rebootless update is securely distributed by using the Oracle Ksplice Uptrack server and ULN, and is then
applied to your systems by the Ksplice Uptrack client or Ksplice Enhanced client, with zero downtime. Your
infrastructure is again up to date and secure.
Note
The Ksplice Uptrack API does not currently support userspace or Xen updates.
However, the online version of the Ksplice Enhanced client can patch shared
libraries for user-space processes that are running on an Oracle Linux 6, Oracle
Linux 7, or Oracle Linux 8 system.
4
Using Ksplice With Oracle Enterprise Manager
To learn more about using Oracle Enterprise Manager to monitor and use Oracle Ksplice patching
on Oracle Linux hosts, see the Oracle Enterprise Manager Lifecycle Management Administrator's
Guide at https://docs.oracle.com/cd/cloud-control-13.3/EMLCM/GUID-DA483950-9009-4293-
BEF2-2F3C9DAACF33.htm#EMLCM-GUID-DA483950-9009-4293-BEF2-2F3C9DAACF33.
For a quick reference to the level of support that each Ksplice client provides and when to use each client,
see Section 1.3.1, “Choosing a Ksplice Client”.
Note
To use Ksplice to patch the Xen hypervisor on Oracle VM, the minimum Xen
hypervisor version that is required is xen-4.4.4-196.el6.x86_64.rpm.
The Ksplice Enhanced client can patch in-memory pages of Ksplice-aware shared libraries such as glibc
and openssl for user-space processes, in addition to the kernel updates that are applied by the traditional
Ksplice Uptrack client. User-space patching enables you to install bug fixes and protect your system
against security vulnerabilities, without having to restart processes and services. Both an online and an
offline version of the enhanced client are available.
You manage the Ksplice Enhanced client by using the ksplice command rather than uptrack
commands. Note that the enhanced client shares the same configuration file as the Uptrack client, which
is located at /etc/uptrack/uptrack.conf. For more information about this file, see Section 3.3,
“Configuring the Ksplice Uptrack Client”.
• Ksplice reports an error similar to the following if it cannot apply updates to processes that do not have
access to the /var/cache/ksplice directory:
Ksplice was unable to load the update as the target process is in a
different mount namespace or has changed root. The service must be
restarted to apply on-disk updates.
Extra information: the process has changed root or mount namespace.
└─ rtkit-daemon (3680)
This error might typically occur with processes that use chroot or those that run in an LXC or Docker
container. In such cases, you must restart the process to apply any available updates. For example,
to restart the rtkit-daemon service, you would use the systemctl restart rtkit-daemon
command.
5
About the Ksplice Uptrack Client
To avoid having to restart a chrooted application that you maintain and compile, ensure that the /var/
cache/ksplice directory is bind-mounted in the chrooted environment.
• Ksplice cannot patch applications that use either setcontext or swapcontext from glibc to perform
user-space context switching between process threads.
• Due to certain kernel limitations, Ksplice does not patch the init process (PID 1).
On Oracle Linux 7, the init process, which is actually systemd, is automatically re-executed on
system updates, so it does not require patching with Ksplice.
On Oracle Linux 6, Upstart is not capable of re-executing itself, so any updates to glibc that can affect
Upstart might require a reboot.
The offline version of the Ksplice Enhanced client removes the requirement that a server on your intranet
have a direct connection to the Oracle Uptrack server or to ULN. All available Ksplice updates for each
supported kernel version or user-space package are bundled into an RPM that is specific to that version.
This package is updated every time a new Ksplice patch becomes available for the kernel. In this way, you
can create a local ULN mirror that acts as a mirror for the Ksplice-aware channels for Oracle Linux on ULN.
See Section 2.5, “Configuring the Ksplice Enhanced Client for Offline Mode”.
At regular intervals, you can download the latest Ksplice update packages to this server. After installing
the offline Ksplice Enhanced client on your local systems, they can then connect to the local ULN mirror to
receive updates. See Section 1.3.4, “Configuring a Local ULN Mirror to Act as a Ksplice Mirror” for more
information about configuring a local ULN mirror.
When you have set up a local ULN mirror to act as a Ksplice mirror, you can then configure your other
systems to receive yum updates, as well as Ksplice updates. For task-related information, see Chapter 2,
Working With the Ksplice Enhanced Client.
Ksplice Uptrack is freely available for Oracle customers who subscribe to Oracle Linux Premier Support,
and to Oracle Cloud Infrastructure services. If you are an Oracle Linux Basic, Basic Limited, or Network
Support subscriber, contact your sales representatives to discuss a potential upgrade of your subscription
to a Premier Support plan.
The Ksplice Offline client removes the requirement that a server on your intranet have a direct connection
to the Oracle Uptrack server. All of the available Ksplice updates for each supported kernel version are
bundled into an RPM that is specific to that version. This package is updated every time a new Ksplice
patch becomes available for the kernel.
A Ksplice Offline client does not require a network connection to be able to apply the update package to
the kernel. For example, you could use the yum command to install the update package directly from a
memory stick. However, a more typical method would be to create a local ULN mirror that acts as a mirror
of the Ksplice for Oracle Linux channels on ULN. At regular intervals, you download the latest Ksplice
update packages to this server. After installing the Ksplice Offline client on your local systems, the systems
6
Preparing to Use Oracle Ksplice
can connect to the local ULN mirror to receive updates without requiring access to the Oracle Uptrack
server. See Section 3.7, “Working With the Ksplice Uptrack Client in Offline Mode”.
For information about when you might want to use the Ksplice Offline client, see Section 1.3.1, “Choosing a
Ksplice Client”.
Note
You cannot use the web interface or the Ksplice Uptrack API to monitor systems
that are running Ksplice Offline client, as such systems are not registered with
https://status-ksplice.oracle.com/static/landing.html.
• Choose a Ksplice client. Determine which Ksplice client will best suit your needs, as the additional tasks
described in this section are dictated by the Ksplice client that you choose to install. See Section 1.3.1,
“Choosing a Ksplice Client” for more details.
• Register your system with ULN. If you are running Oracle Linux 6 or Oracle Linux 7, see Oracle® Linux:
Unbreakable Linux Network User's Guide for Oracle Linux 6 and Oracle Linux 7.
If you are running Oracle Linux 8, see Oracle® Linux 8: Managing Software on Oracle Linux.
• Ensure that you have a valid Oracle Linux Premier, Premier Limited, or Oracle Premier Support for
Systems and Operating Systems subscription, as any of these subscriptions automatically register you
to use the Ksplice Uptrack server at https://status-ksplice.oracle.com/status/settings. See Section 1.3.2,
“About Oracle Ksplice and ULN Registration”.
• If you plan to use either the Ksplice Enhanced client or the Ksplice Uptrack client as offline clients, you
must first set up a local ULN mirror first, as described in Section 1.3.4, “Configuring a Local ULN Mirror
to Act as a Ksplice Mirror”.
• If you are using Ksplice with Spacewalk, you must also set up a local ULN mirror, as described in
Section 1.3.5, “Configuring an Oracle Linux 7 Spacewalk Server to Act as a Ksplice Mirror”.
For further details on setting up the Ksplice Enhanced client in offline mode, see Section 2.5, “Configuring
the Ksplice Enhanced Client for Offline Mode”. For further details on setting up the Ksplice Uptrack client in
offline mode, see Section 3.7.1, “Configuring Ksplice Uptrack Clients for Offline Mode”
7
Available Ksplice Channels
client is configured to function as an offline client, you must configure a local ULN mirror that the client can
access to receive updates. For more information, see Section 1.3.4, “Configuring a Local ULN Mirror to Act
as a Ksplice Mirror”.
If you have an Oracle Linux Premier support subscription, a Premier Limited support subscription, or
an Oracle Premier Support for Systems and Operating Systems subscription and a Customer Support
Identifier (CSI), your account is automatically registered to use the Ksplice Uptrack server. Systems that
are registered with ULN can install either the Ksplice Enhanced client software or the Ksplice Uptrack client
software from ULN to automatically receive updates from the Ksplice Uptrack server. When the Ksplice
client is installed, it is allocated an identification key that associates it with the CSI for your account.
If your account has a valid CSI, you can log in to the Ksplice Uptrack server web interface at https://status-
ksplice.oracle.com/status/settings by using your Oracle Account credentials. After logging into the server,
you can view the status of your registered systems, the patches that have been applied, and the patches
that are available. You can also create access control groups for your registered systems.
8
Configuring an Oracle Linux 7 Spacewalk Server to Act as a Ksplice Mirror
For more information about setting up a local ULN mirror, see Creating and Using a Local ULN Mirror in
the Oracle Linux Unbreakable Linux Network User's Guide.
1. Using a browser, log in to https://linux.oracle.com by providing the ULN user name and password that
you used to register your system.
2. On the Systems tab, click the link that is named for your system in the list of registered machines.
4. On the Edit System Properties page, select the Yum Server check box and then click Apply Changes.
6. On the System Summary page, select channels from the list of available or subscribed channels and
click the arrows to move the channels between the lists.
Modify the list of subscribed channels to include those Ksplice for Oracle Linux channels that you want
to make available to local offline clients. See Section 1.3.3, “Available Ksplice Channels”.
7. When you are finished selecting channels, save the subscription and log out of ULN.
To configure a Spacewalk server to act as a Ksplice mirror, you configure repositories and the associated
software channels for the Oracle Linux releases and architectures of the systems on which you want to run
Ksplice Offline client. Note that each Ksplice channel should be a child of the appropriate base software
channel. For information about the channels that are available for Ksplice, see Section 1.3.3, “Available
Ksplice Channels”.
You would then specify the URL for the appropriate Ksplice channel. For example, for the Oracle Linux 7
(x86_64) channel on ULN, you would specify the URL as follows:
uln:///ol7_x86_64_ksplice
For more information, see Chapter 12 of the Spacewalk 2.7 for Oracle Linux Client Life Cycle Management
Guide for the Oracle Linux release that you are running.
9
10
Chapter 2 Working With the Ksplice Enhanced Client
Table of Contents
2.1 Requirements for Installing the Ksplice Enhanced Client ............................................................... 11
2.2 Installing the Ksplice Enhanced Client From ULN ......................................................................... 12
2.3 Managing the Ksplice Enhanced Client by Using the ksplice Command ......................................... 14
2.4 Preventing the Ksplice Enhanced Client From Patching User-Space Processes and Libraries .......... 17
2.5 Configuring the Ksplice Enhanced Client for Offline Mode ............................................................ 18
2.6 Removing the Ksplice Enhanced Client Software ......................................................................... 20
2.7 Using the Known Exploit Detection Feature on the Ksplice Enhanced Client .................................. 21
2.7.1 Running Known Exploit Detection on the Ksplice Enhanced Client ...................................... 21
2.7.2 Setting Up Email Alerts for Exploit Attempts ...................................................................... 22
2.7.3 Temporarily Disabling and Re-Enabling Tripwires .............................................................. 22
This chapter describes how to install and configure the Ksplice Enhanced client to update packages on a
running system. For more information about Ksplice Uptrack, visit http://www.ksplice.com/.
Note
Some of the instructions and examples in this document apply to multiple Oracle
Linux releases. The examples use the yum command for compatibility with several
supported versions of Oracle Linux. If you are running Oracle Linux 8, you may opt
to use the dnf command, as appropriate.
The system on which you install the enhanced client must meet the following additional requirements:
• Must be registered with ULN or have access to the ULN channels on a mirror.
• Must have access to the Internet or a host that is running a local ULN mirror. See Section 1.3.4,
“Configuring a Local ULN Mirror to Act as a Ksplice Mirror”.
• Must be running either Oracle Linux 6, Oracle Linux 7, or Oracle Linux 8, with a supported version of
either the Unbreakable Enterprise Kernel (UEK) or the Red Hat Compatible Kernel (RHCK) installed.
Note
Support for the Ksplice Enhanced client is not available on Oracle Linux 5.
To verify the kernel version that you are running, use the uname -a command. See Section 1.1.1,
“Supported Kernels”.
• Must be running the same kernel that you want to update. It is assumed that the currently running kernel
is the one that you want to update, as Ksplice applies updates to the currently running kernel only.
11
Installing the Ksplice Enhanced Client From ULN
Note
The following procedure applies to Oracle Linux releases only. If you plan to use
Ksplice to patch the Xen hypervisor on Oracle VM 3.4.5, and later releases, refer to
the documentation for the Oracle VM release that you are running for instructions.
For example, if you are running Oracle VM 3.4.5, see Updating Oracle VM Server
With Oracle Ksplice in the Oracle VM Administration Guide for Release 3.4.
1. Using a browser, log in at https://linux.oracle.com with the ULN user name and password that you used
to register the system, then perform the following steps:
a. On the Systems tab, click the link named for your system in the list of registered machines.
The Ksplice Enhanced client and Ksplice-aware user-space packages are available in the following
channels on ULN:
c. On the System Summary page, select both the Userspace Ksplice channel and the Ksplice
channel from the list of available channels, then click the right arrow (>) to move them to the list of
subscribed channels.
d. Accept the licensing terms for the Ksplice Enhanced client packages.
2. If you use an Internet proxy, configure the HTTP and HTTPS settings for the proxy in the shell as
follows:
• For the sh, ksh, or bash shells, use commands such as the following:
# http_proxy=http://proxy_URL:http_port
# https_proxy=http://proxy_URL:https_port
# export http_proxy https_proxy
12
Installing the Ksplice Enhanced Client From ULN
# setenv https_proxy=http://proxy_URL:https_port
4. If prelink is installed, revert all prelinked binaries and dependent libraries to their original state and
use the yum command to remove the prelink package.
# prelink -au
# yum remove prelink
Note
prelink is installed and enabled by default on Oracle Linux 6, but not Oracle
Linux 7 or Oracle Linux 8.
The access key for Ksplice Uptrack is retrieved from ULN and added to /etc/uptrack/
uptrack.conf, as shown in the following example:
[Auth]
accesskey = 0e1859ad8aea14b0b4306349142ce9160353297daee30240dab4d61f4ea4e59b
The packages that are installed on the system include the following:
6. Update the system to install the Ksplice-aware versions of the user-space libraries:
# yum update
To install just the libraries and not update any other packages, limit the update to the following
channels, as appropriate: ol6_x86_64_userspace_ksplice, ol7_x86_64_userspace_ksplice
or ol8_x86_64_userspace_ksplice, for example:
You can also use the glibc* and openssl* syntax with the install command for your package
manager. To use this client to perform kernel updates, install it in the same way that you are able to use
the standard Uptrack client:
13
Managing the Ksplice Enhanced Client by Using the ksplice Command
7. To enable the automatic installation of updates, change the entry in the /etc/uptrack/
uptrack.conf file from no to yes, as shown in the following example:
autoinstall = yes
# systemctl reboot
# reboot
The enhanced client uses the same configuration file (/etc/uptrack/uptrack.conf) as Ksplice
Uptrack. See Section 3.3, “Configuring the Ksplice Uptrack Client”.
To manage the enhanced client, use the ksplice command, see Section 2.3, “Managing the Ksplice
Enhanced Client by Using the ksplice Command”.
To display all of the running user-space processes that the client can patch, use the ksplice all
list-targets command:
glibc-ISO8859-1-2.17.78.0.1.1.ksplice25.el7
└─ gnome-shell (3783)
glibc-libutil-2.17.78.0.1.1.ksplice25.el7
├─ firewalld (680)
├─ tuned (695)
├─ libvirtd (1492)
├─ sshd (1497)
├─ httpd (1503)
├─ httpd (1706)
├─ httpd (1707)
├─ httpd (1708)
├─ httpd (1709)
├─ httpd (1710)
├─ colord (1942)
├─ gdm-session-wor (3418)
├─ gnome-session (3460)
├─ gvfsd (3534)
├─ gvfsd-fuse (3555)
├─ ssh-agent (3617)
├─ gnome-settings- (3658)
├─ gvfs-udisks2-vo (3727)
├─ gvfs-afc-volume (3754)
├─ gvfs-mtp-volume (3761)
├─ gvfs-gphoto2-vo (3765)
├─ gvfs-goa-volume (3769)
14
Managing the Ksplice Enhanced Client by Using the ksplice Command
├─ goa-daemon (3772)
├─ gnome-shell (3783)
├─ ibus-daemon (3817)
├─ ibus-dconf (3821)
├─ ibus-x11 (3823)
├─ evolution-sourc (3853)
├─ nautilus (3882)
├─ ibus-engine-sim (3884)
├─ tracker-store (3943)
├─ abrt-applet (3980)
├─ tracker-miner-f (4040)
├─ gvfsd-trash (4062)
├─ sshd (29328)
├─ packagekitd (29465)
└─ python (29679)
...
Kernel version: Linux/x86_64/3.10.0-229.el7.x86_64/#1 SMP Fri Mar 6 04:05:24 PST 2015
Xen version: xen/x86_64/#2 SMP Tue Aug 15 13:47:00 PDT 2017/Tue Aug 1 20:27:56 PDT 2017
To display just the Xen hypervisor targets that the client can patch, use the ksplice xen list-
targets command:
For each Ksplice-aware library, the command reports the running processes that would be affected by an
update. The command also reports the effective version of the loaded kernel.
To display the updates that have been applied to the system, use the ksplice all show command:
Installed updates:
[rfywob9d] Clear garbage data on the kernel stack when handling signals.
[6w5ho5e2] Provide an interface to freeze tasks.
[ftjj21d0] CVE-2015-1421: Privilege escalation in SCTP INIT collisions.
[kw5m66w8] CVE-2015-8159: Privilege escalation in Infiniband userspace access.
[2w6jgsn7] CVE-2015-3331: Privilege escalation in Intel AES RFC4106 decryption.
[p0gek4ir] CVE-2014-9420: Infinite loop in isofs when parsing continuation entries.
[sjqkwypd] CVE-2014-9529: Use-after-free when garbage collecting keys.
[tfn81scy] CVE-2015-1593: Stack layout randomization entropy reduction.
[jga5l35w] CVE-2015-1573: Use-after-free when flushing netfilter rules.
[gdzmj5lc] CVE-2014-9584: Out-of-bounds memory access in ISO filesystem when printing ER records.
[01560qvg] CVE-2015-2830: mis-handling of int80 fork from 64bits application.
[7ylonu77] CVE-2015-1805: Memory corruption in handling of userspace pipe I/O vector.
[7yehlpm8] Kernel hang on UDP flood with wrong checksums.
[xp1v1o7h] CVE-2014-9715: Remote code execution in the netfilter connection tracking subsystem.
[89yjgn50] CVE-2015-3636: Memory corruption when unhashing IPv4 ping sockets.
[g327jyvw] CVE-2015-2922: Denial-of-service of IPv6 networks when handling router advertisements.
15
Managing the Ksplice Enhanced Client by Using the ksplice Command
The command reports both the updates that have been applied to running processes and to the kernel. In
this example, Ksplice has applied updates for CVE-2014-7817 and CVE-2015-1781 to all of the listed
processes.
To restrict the scope of the ksplice command to user-space updates or kernel updates, specify user or
kernel instead of all with the command.
To restrict the ksplice command to just the Xen hypervisor, specify xen instead of all with the
command.
To display the updates that have been applied to a process specified by its PID, use the --pid=PID
option with the ksplice user show command:
Use the remove subcommand to remove all of the updates from a process, for example:
To remove a specific update that Ksplice has applied to a process, use the undo subcommand:
Note
If necessary, you can prevent Ksplice from patching specified executables and
libraries. See Section 2.4, “Preventing the Ksplice Enhanced Client From Patching
User-Space Processes and Libraries”.
Ksplice patches are stored in the /var/cache/uptrack directory. Following a reboot, Ksplice
automatically re-applies these patches very early in the boot process before the network is configured so
that the system is hardened before any remote connections can be established.
To list all of the available Ksplice updates, use the upgrade subcommand:
To install all of the available Ksplice updates, use the upgrade subcommand as follows:
To list all of the available Ksplice updates for the Xen hypervisor, use the upgrade subcommand:
After Ksplice applies updates to a running kernel, the kernel has an effective version that is different than
the original boot version displayed by the uname -a command.
Use the ksplice kernel uname -r command to display the effective version of the kernel:
16
Preventing the Ksplice Enhanced Client From Patching User-Space Processes and Libraries
The ksplice kernel uname command supports the commonly used uname flags, including -a and -r,
and also provides a way for applications to detect that the kernel has been patched. The effective version
is based on the version number of the latest patch that Ksplice Uptrack has applied to the kernel.
The following examples show ways in which you can view information about Ksplice updates and
administer Ksplice updates on a system.
View the updates that Ksplice Uptrack has made to the running kernel:
View the updates that Ksplice Uptrack has made to the Xen hypervisor:
Prevent Ksplice from reapplying the updates at the next system reboot, create the empty file /etc/
uptrack/disable:
# touch /etc/uptrack/disable
Alternatively, you can specify nouptrack as a parameter on the boot command line when you next restart
the system.
For more information and examples, see the ksplice(8) manual page.
[executables]
^/opt/apt/bin/.*$
^/usr/local/bin/.*$
[targets]
^liblocal-.*$
17
Configuring the Ksplice Enhanced Client for Offline Mode
At regular intervals, you can download the latest Ksplice update packages to this server. After installing
the offline Ksplice Enhanced client on your local systems, they can then connect to the local ULN mirror to
receive updates. After you have set up a local ULN mirror to act as a Ksplice mirror, you can then configure
your other systems to receive yum updates, as well as Ksplice updates. See Section 1.3.4, “Configuring a
Local ULN Mirror to Act as a Ksplice Mirror” for more information about configuring a local ULN mirror.
2. Disable any existing yum repositories configured in the /etc/yum.repos.d directory. You can either
edit any existing repository files and disable all entries by setting enabled=0 or you can use yum-
config-manager, for example:
# yum-config-manager --disable \*
Alternatively, you can rename any of the files in this directory so that they do not use the .repo suffix.
This change causes the yum command to ignore these entries, as shown in the following example:
# cd /etc/yum.repos.d
# for i in *.repo; do mv $i $i.disabled; done
3. In the /etc/yum.repos.d directory, create the local-yum.repo file, which contains entries such
as the following for an Oracle Linux 7 yum client:
[local_ol7_x86_64_ksplice]
name=Ksplice for Oracle Linux $releasever - $basearch
baseurl=http://local_uln_mirror/yum/OracleLinux/OL7/ksplice/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY
gpgcheck=1
enabled=1
[local_ol7_x86_64_ksplice_userspace]
name=Ksplice aware userspace packages for Oracle Linux $releasever - $basearch
baseurl=http://local_uln_mirror/yum/OracleLinux/OL7/userspace/ksplice/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY
gpgcheck=1
enabled=1
[local_ol7_latest]
name=Oracle Linux $releasever - $basearch - latest
baseurl=http://local_uln_mirror/yum/OracleLinux/OL7/latest/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY
gpgcheck=1
enabled=1
[local_ol7_UEKR5_latest]
name=Unbreakable Enterprise Kernel Release 5 for Oracle Linux $releasever - $basearch - latest
baseurl=http://local_uln_mirror/yum/OracleLinux/OL7/UEKR5/latest/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY
gpgcheck=1
enabled=1
[local_ol7_addons]
name=Oracle Linux $releasever - $basearch - addons
baseurl=http://local_uln_mirror/yum/OracleLinux/OL7/addons/$basearch/
18
Configuring the Ksplice Enhanced Client for Offline Mode
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY
gpgcheck=1
enabled=1
• Replace local_uln_mirror with the IP address or resolvable host name of the local ULN mirror.
• To distinguish the local repositories from the ULN repositories, optionally prefix the labels for each
entry with a string such as local_. Note that you must also edit the uptrack configuration, as
described in step 7.
If the yum commands cannot connect to the local ULN mirror, check that the firewall settings on the
local ULN mirror server allow incoming TCP connections to the HTTP port (usually, port 80).
5. If prelink is installed, revert all of the prelinked binaries and dependent libraries to the original states
and then remove the prelink package as follows:
# prelink -au
# yum remove prelink
The prelink package is installed and enabled by default on Oracle Linux 6, but not on Oracle Linux 7
or Oracle Linux 8.
Note
You can skip this step if you did not use the local_ prefix for the channel label,
and this label is an exact match of the label that is used on ULN. If you used
the local_ prefix or labeled this channel differently, add the following lines, but
instead of local_ol7_x86_64_ksplice_userspace, specify the same label
that you used for the Ksplice Userspace channel, for example:
[User]
yum_userspace_ksplice_repo_name = local_ol7_x86_64_ksplice_userspace
8. To install offline update packages, install the relevant packages, for example:
# yum install ksplice-updates-glibc ksplice-updates-openssl
If you are installing the offline updates package for the Xen hypervisor, specify the release in the
command, for example:
19
Removing the Ksplice Enhanced Client Software
For the previous command, $RELEASE is the update package that corresponds to the version of the
hypervisor that is currently running, as shown in this example:
# yum install ksplice-updates-xen-4.4.4-153.el6
After you have installed these packages, the offline version of the enhanced client behaves exactly the
same way as the online version.
9. Update the system to install the Ksplice-aware versions of the user-space libraries:
# yum update
To install just the libraries and not any other packages, limit the update to the Ksplice userspace
channel, for example, ol7_x86_64_userspace_ksplice channel:
# yum --disablerepo=* --enablerepo=ol7_x86_64_userspace_ksplice update
You might also use this client to perform kernel updates in the same way that you are able to use the
standard uptrack client:
# yum install uptrack-updates-`uname -r`
10. To enable the automatic installation of updates, change the entry in /etc/uptrack/uptrack.conf
from no to yes, as shown in the following example:
autoinstall = yes
11. Reboot the system so that the system uses the new libraries.
Note
To remove the offline version of the Ksplice Enhanced client software from a system, type the following
command:
# yum -y remove ksplice-offline
To remove the Ksplice-aware versions of the glibc+openssl packages from the system, follow these
steps:
20
Using the Known Exploit Detection Feature on the Ksplice Enhanced Client
Note
Because not all security issues have tripwires added, and also because it is
possible to trigger tripwires under normal operations, additional analysis of
erroneous conditions might be required.
4. Verify that the feature has been enabled for the current kernel:
# cat /proc/sys/kernel/known_exploit_detection
If the value is 0 or the file is missing, then the kernel has not enabled kernel exploit detection. If the
value is 1, known exploit detection is enabled on the system.
The helper file, /usr/sbin/log-known-exploit, is invoked directly by the kernel. To invoke the help
manually to check your configuration or perform dry-run tests, use the following command:
# /usr/sbin/log-known-exploit --help
21
Setting Up Email Alerts for Exploit Attempts
You can specify the following additional options and arguments with this command:
-f, --force Run the command without checking for root permissions.
-n, --dry-run Simulate the output and expected actions that would be performed by
the helper file.
-d, --dummy Use dummy data to verify that report logging is configured correctly.
You can use the same configuration file to specify which tripwire reports should be logged or ignored:
[actions]
CVE-2019-12345: report
CVE-2019-12346: ignore
To define the logging behavior for tripwires that are not specified, add a value for default to the list. For
example, to avoid logging any tripwire reports unless they are specified, do the following:
[actions]
default: ignore
To disable a specific tripwire until the next reboot, remove the CVE reference from the /proc/sys/
kernel/known_exploit_detection_tripwires file as follows:
# echo -n '-CVE-2019-12345' > /proc/sys/kernel/known_exploit_detection_tripwires
To re-enable a specific tripwire, re-append the CVE reference to the same configuration file:
# echo -n '+CVE-2019-12345' > /proc/sys/kernel/known_exploit_detection_tripwires
22
Chapter 3 Working With Ksplice Uptrack
Table of Contents
3.1 Installing Ksplice Uptrack From ULN ........................................................................................... 23
3.2 Installing Ksplice Uptrack Within Oracle Cloud Infrastructure ......................................................... 24
3.3 Configuring the Ksplice Uptrack Client ......................................................................................... 25
3.4 Managing Ksplice Updates by Using the uptrack-upgrade Command ............................................. 26
3.5 Removing the Ksplice Uptrack Client Software ............................................................................. 27
3.6 Switching Between Online and Offline Ksplice Uptrack Installation Modes ...................................... 27
3.7 Working With the Ksplice Uptrack Client in Offline Mode .............................................................. 27
3.7.1 Configuring Ksplice Uptrack Clients for Offline Mode ......................................................... 28
3.8 Updating the Ksplice Uptrack Client to a Specific Effective Kernel Version ..................................... 30
3.9 Using the SNMP Plugin for Ksplice Uptrack ................................................................................. 31
3.9.1 Installing and Configuring the SNMP Plugin ...................................................................... 31
3.9.2 Testing the SNMP Plugin ................................................................................................. 32
This chapter describes how to configure and use Ksplice Uptrack to update packages on a running system.
For more information about Ksplice Uptrack, visit http://www.ksplice.com/.
Note
Some of the instructions and examples in this document apply to multiple Oracle
Linux releases. The examples use the yum command for compatibility with several
supported versions of Oracle Linux. If you are running Oracle Linux 8, you may opt
to use the dnf command, as appropriate.
The system on which you want to install Ksplice Uptrack must also meet the following requirements:
• Must be running a supported Oracle Linux release, with a supported version of either UEK or RHCK
installed. You can verify the kernel version by using the uname -a command. See Section 1.1.1,
“Supported Kernels”.
• The kernel that is currently running is also the kernel you want to update, as Ksplice Uptrack applies
updates only to the running kernel.
2. If you use an Internet proxy, configure the HTTP and HTTPS settings for the proxy in the shell.
• For the sh, ksh, or bash shells, use commands such as the following:
23
Installing Ksplice Uptrack Within Oracle Cloud Infrastructure
# http_proxy=http://proxy_URL:http_port
# https_proxy=http://proxy_URL:https_port
# export http_proxy https_proxy
3. Using a browser, log in at https://linux.oracle.com with your ULN user name and password, then do the
following:
a. On the Systems tab, click the link that is named for your system in the list of registered machines.
c. On the System Summary page, from the list of available channels, select the appropriate Ksplice for
Oracle Linux channel your Oracle Linux release system's architecture (i386 or x86_64).
d. Click the right arrow (>) to move your selection to the list of subscribed channels.
4. On your system, use the yum command to install the uptrack package.
# yum install -y uptrack
The access key for Ksplice Uptrack is retrieved from ULN and added to /etc/uptrack/
uptrack.conf, for example:
[Auth]
accesskey = 0e1859ad8aea14b0b4306349142ce9160353297daee30240dab4d61f4ea4e59b
5. To enable automatic installation of updates, change the value of the autoinstall entry in the /etc/
uptrack/uptrack.conf file from no to yes:
autoinstall = yes
For information about configuring Ksplice Uptrack, see Section 3.3, “Configuring the Ksplice Uptrack
Client”.
For information about managing Ksplice updates, see Section 3.4, “Managing Ksplice Updates by Using
the uptrack-upgrade Command”.
Note
The following installation procedure is only required for Oracle Cloud Infrastructure
instances that were launched prior to August 25, 2017.
For Oracle Cloud Infrastructure instances launched on or after August 25, 2017,
Ksplice is installed by default. For these instances, you only need to run Ksplice to
install the available Ksplice patches.
24
Configuring the Ksplice Uptrack Client
For information about configuring the Ksplice Uptrack client and managing Ksplice
updates, see Section 3.3, “Configuring the Ksplice Uptrack Client” and Section 3.4,
“Managing Ksplice Updates by Using the uptrack-upgrade Command”.
$ ssh –l opc@public-ip-address
In the previous command, public-ip-address is the instance IP address that you retrieved from
the Console. For more information, see https://docs.cloud.oracle.com/en-us/iaas/Content/GSG/Tasks/
launchinginstance.htm#Getting.
$ sudo bash
$ wget -N https://www.ksplice.com/uptrack/install-uptrack-oc
$ sh install-uptrack-oc
If your system is registered with the Ksplice Uptrack repository, the client communicates with the Uptrack
server by connecting to https://updates.ksplice.com:443. You can either configure your firewall to
allow the connection through port 443, or you can configure the client to use a proxy server. To configure
the client to use a proxy server, set the following entry in the /etc/uptrack/uptrack.conf file:
https_proxy = https://proxy_URL:https_port
You receive an email notification when Ksplice updates are available for your system.
To instruct the client to install all updates automatically, as they become available, set the following entry in
the /etc/uptrack/uptrack.conf file:
autoinstall = yes
25
Managing Ksplice Updates by Using the uptrack-upgrade Command
Note
Enabling the automatic installation of updates does not automatically update the
Ksplice client itself. Oracle notifies you by email when you can upgrade the Ksplice
software by using the yum command.
Setting the autoinstall entry value to yes also installs updates automatically at boot time. When you
boot the system, the /etc/init.d/uptrack script reapplies the installed Ksplice updates.
To install all available updates at boot time, uncomment the following entry in the /etc/uptrack/
uptrack.conf file:
upgrade_on_reboot = yes
Note
To list all of the available Ksplice updates, use the uptrack-upgrade command:
# uptrack-upgrade -n
After Ksplice has applied updates to a running kernel, the kernel has an effective version that is different
from the original boot version displayed by the uname -a command.
Use the uptrack-uname command to display the effective version of the kernel:
# uptrack-uname -r
The uptrack-uname command supports commonly used uname flags, including -a and -r, and also
provides a way for applications to detect that the kernel has been patched. The effective version is based
on the version number of the latest patch that Ksplice has applied to the kernel.
The following examples show ways in which you can view information about Ksplice updates and
administer Ksplice updates on a system.
View the updates that Ksplice has made to the running kernel:
# uptrack-show
26
Removing the Ksplice Uptrack Client Software
Prevent Ksplice from reapplying the updates at the next system reboot, create the empty file /etc/
uptrack/disable:
# touch /etc/uptrack/disable
Alternatively, you can specify the nouptrack argument as a parameter on the boot command line when
you next reboot the system.
Caution
For example, if you have the Ksplice Uptrack client software installed on the system and you want to install
the Ksplice Offline Enhanced client software, you would need to first remove the Ksplice Uptrack client
software, and then install the Ksplice Offline Enhanced client software as follows:
# yum remove uptrack ksplice-tools
# yum install ksplice-offline
To switch from an offline installation to an online installation, for example, switch from the Ksplice Uptrack
Offline client software to the Ksplice Uptrack client software, you would run the following commands:
# yum remove ksplice-offline ksplice-tools
# yum install uptrack
Note
You cannot use the web interface or the Ksplice Uptrack API to monitor systems
that are running Ksplice Offline client, as such systems are not registered with
https://status-ksplice.oracle.com/static/landing.html.
27
Configuring Ksplice Uptrack Clients for Offline Mode
You can also configure Ksplice Offline Clients by creating software channels in Spacewalk that can act as
a Ksplice mirror. For instructions, see Chapter 12 of the Spacewalk 2.7 for Oracle Linux Client Life Cycle
Management Guide.
To configure a system as a Ksplice Offline client by setting up a local ULN mirror, do the following:
• Disable any existing yum repositories configured in the /etc/yum.repos.d directory. You can
either edit any existing repository files and disable all entries by setting enabled=0 or you can use
yum-config-manager:
# yum-config-manager --disable \*
Alternately, you can rename any of the files in this directory so that they do not use the .repo suffix.
This causes yum to ignore these entries. For example:
# cd /etc/yum.repos.d
# for i in *.repo; do mv $i $i.disabled; done
• In the /etc/yum.repos.d directory, create the file local-yum.repo, which contains entries such
as the following for an Oracle Linux 7 yum client:
[local_ol7_x86_64_ksplice]
name=Ksplice for Oracle Linux $releasever - $basearch
baseurl=http://local_uln_mirror/yum/OracleLinux/OL7/ksplice/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY
gpgcheck=1
enabled=1
[local_ol7_latest]
name=Oracle Linux $releasever - $basearch - latest
baseurl=http://local_uln_mirror/yum/OracleLinux/OL7/latest/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY
gpgcheck=1
enabled=1
[local_ol7_UEKR5_latest]
name=Unbreakable Enterprise Kernel Release 5 for Oracle Linux $releasever - $basearch - latest
baseurl=http://local_uln_mirror/yum/OracleLinux/OL7/UEKR5/latest/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY
gpgcheck=1
enabled=1
[local_ol7_addons]
name=Oracle Linux $releasever - $basearch - addons
baseurl=http://local_uln_mirror/yum/OracleLinux/OL7/addons/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY
gpgcheck=1
enabled=1
28
Configuring Ksplice Uptrack Clients for Offline Mode
• To distinguish the local repositories from the ULN repositories, prefix the labels of their entries with
a string such as local_.
• Replace local_uln_mirror with the IP address or resolvable host name of the local ULN
mirror.
# yum repolist
Note
If the yum command cannot connect to the local ULN mirror, check that
the firewall settings on the local ULN mirror server allow incoming TCP
connections to the HTTP port (usually, port 80).
5. Install the Ksplice updates that are available for the kernel.
As new Ksplice updates are made available, use the same command to pick up and apply these
updates. You should set up an anacron script to perform this task. For example, the following script
named uptrack-updates in /etc/cron.daily would run one time daily:
#!/bin/sh
yum -y install uptrack-updates-`uname -r`
exit 0
Important
The script must be executable and be owned by root. Also, you must include
the -y option with the yum command when using a script; otherwise, the
command hangs and waits for user input.
To display information about Ksplice updates, use the rpm -qa | grep uptrack-updates and
uptrack-show commands.
29
Updating the Ksplice Uptrack Client to a Specific Effective Kernel Version
The options for selecting a specific effective version are only available in the Ksplice Offline client for use
with the offline update RPM packages.
Note
Oracle Ksplice is intended to provide the latest security and stability fixes, and
the goal is to get the effective kernel up-to-date as soon as possible. Choosing a
specific effective kernel version is only intended to allow the offline update RPM
package to be updated without immediately applying the latest available patches
bundled in that package. This enables production systems to remain temporarily at
a tested update level, while the latest updates are tested in an integration or UAT
environment.
2. Use the uptrack-uname -r command to display the current effective kernel version:
# uptrack-uname -r
3. To list all of the effective kernel versions that are available, specify the --list-effective option to
the uptrack-upgrade command, for example:
# uptrack-upgrade --list-effective
Available effective kernel versions:
4. Remove the installed updates to revert the effective kernel version to the earliest that is available,
which is 44.1.1 in the following example:
# uptrack-remove --all
...
# uptrack-uname -r
3.8.13-44.1.1.el6uek.x86_64
5. You can set the effective kernel version that you want the system to use by using either of the following
methods:
30
Using the SNMP Plugin for Ksplice Uptrack
For example, if you want to update from 44.1.1 to 44.1.5 instead of updating to the latest 55.1.1, use
the --effective option to specify 44.1.5:
# uptrack-upgrade --effective="3.8.13-44.1.5.el6uek.x86_64/#2 SMP Wed Nov 12 14:23:31 PST 2014"
...
Effective kernel version is 3.8.13-44.1.5.el6uek
# uptrack-uname -r
3.8.13-44.1.5.el6uek.x86_64
This method is suitable for setting the effective kernel version on individual systems.
This method is convenient for setting the effective version for a package on multiple production
systems, where the content of the /etc/uptrack/uptrack.conf file can be obtained from a
centrally maintained master copy.
• The net-snmp-utils package must be installed if you want to be able to test the configuration using
the snmpwalk command.
To install and configure the SNMP plugin on a system that you want to monitor using SNMP, follow these
steps:
1. Subscribe the system to the appropriate Ksplice channel for the installed Oracle Linux distribution and
system architecture, for example, ol6_x86_64_ksplice for Oracle Linux 6 on x86_64.
3. (Optional) If you plan to test the configuration by using the snmpwalk command, install the net-
snmp-utils package as follows:
# yum -y install net-snmp-utils
4. Configure the system to use the SNMP plugin by editing the /etc/snmp/snmpd.conf file.
31
Testing the SNMP Plugin
The following example shows how the entries in this file might look on an Oracle Linux 6 system:
# Setting up permissions
# ======================
com2sec local localhost public
com2sec mynet source public
a. In the com2sec mynet community entry, replace source with the IP address or resolvable host
name of the server that hosts the SNMP monitoring software, or with a subnet address represented
as IP_address/netmask, for example, com2sec mynet 192.168.10.0/24 private.
For IPv6 configuration, specify an IPv6 address and netmask to a com2sec6 mynet community
entry, for example, com2sec6 mynet fec0::/64 private.
b. In the syslocation entry, replace the argument for the identifier of the system being monitored.
c. In the dlmod entry that loads the kspliceUptrack.so plugin, replace the lib path element with
lib on a 32-bit system and lib64 on a 64-bit system.
For Oracle Linux 5 and Oracle Linux 6 clients, use the following command:
32
Testing the SNMP Plugin
To check whether all of the available updates for a kernel have been installed:
$ snmpwalk -v 1 -c public -O e localhost KSPLICE-UPTRACK-MIB::kspliceStatus
KSPLICE-UPTRACK-MIB::kspliceStatus.0 = STRING: outofdate
Display and compare the kernel that is installed on disk with the Ksplice effective version as follows:
$ snmpwalk -v 1 -c public -O e localhost KSPLICE-UPTRACK-MIB::kspliceBaseKernel
KSPLICE-UPTRACK-MIB::kspliceBaseKernel.0 = STRING: 2.6.18-274.3.1.el5
$ snmpwalk -v 1 -c public -O e localhost KSPLICE-UPTRACK-MIB::kspliceEffectiveKernel
KSPLICE-UPTRACK-MIB::kspliceEffectiveKernel.0 = STRING: 2.6.18-274.3.1.el5
In the output of the previous example, the base kernel version and the effective kernel version are the
same, which implies that no updates have been applied.
Display a list of all of the updates that have been applied to the kernel as follows:
$ snmpwalk -v 1 -c public -O e localhost KSPLICE-UPTRACK-MIB::ksplicePatchTable
In the previous example, no updates have been applied, which confirms why the base and effective kernel
versions are the identical and why the kernel is out of date.
After fully upgrading your kernel by using Ksplice Uptrack, you can run the following snmpwalk commands
to verify that the kernel is up to date, that there are no updates available for installation, and also that the
patches that have been applied:
$ snmpwalk -v 1 -c public -O e localhost KSPLICE-UPTRACK-MIB::kspliceStatus
KSPLICE-UPTRACK-MIB::kspliceStatus.0 = STRING: uptodate
$ snmpwalk -v 1 -c public -O e localhost KSPLICE-UPTRACK-MIB::kspliceAvailTable
$ snmpwalk -v 1 -c public -O e localhost KSPLICE-UPTRACK-MIB::ksplicePatchTable
KSPLICE-UPTRACK-MIB::ksplicepatchIndex.0 = INTEGER: 0
KSPLICE-UPTRACK-MIB::ksplicepatchIndex.1 = INTEGER: 1
KSPLICE-UPTRACK-MIB::ksplicepatchIndex.2 = INTEGER: 2
...
33
34
Chapter 4 Working With the Ksplice Uptrack API
Table of Contents
4.1 About the Ksplice Uptrack API .................................................................................................... 35
4.2 Viewing Your API User Name and API Key ................................................................................. 35
4.3 Generating a New API Key ......................................................................................................... 35
4.4 Installing the API Command-Line Tools ....................................................................................... 36
4.5 Ksplice Uptrack API Commands .................................................................................................. 36
4.5.1 About the uptrack-api-authorize Command ........................................................................ 36
4.5.2 About the uptrack-api-describe Command ......................................................................... 36
4.5.3 About the uptrack-api-list Command ................................................................................. 37
4.5.4 Specifying the username and api_key Variables ................................................................ 37
4.5.5 Specifying a Proxy ........................................................................................................... 37
4.6 About the API Implementation ..................................................................................................... 38
4.6.1 API Version ..................................................................................................................... 38
4.6.2 API Authentication ........................................................................................................... 38
4.6.3 API Request Format ........................................................................................................ 38
4.6.4 Supported API Requests .................................................................................................. 38
4.6.5 Interaction Sample ........................................................................................................... 40
4.7 Configuring the check_uptrack Nagios Plugin ............................................................................... 41
4.8 Using the Nagios Plugins ............................................................................................................ 42
This chapter describes the programming interfaces for Ksplice Uptrack. For more information about the
Ksplice Uptrack API, visit http://www.ksplice.com/.
You can use the command-line tools that are included with the Python bindings; or, you can write your own
custom scripts by using the bindings. You can also write your own interface by using HTTP requests. The
Python bindings include the check_uptrack and check_uptrack_local plugins for Nagios. These
plugins enable you to monitor the status of your machines.
Note
You cannot use the Ksplice Uptrack API to monitor machines that are running
Ksplice Offline client because these systems are not registered with https://
uptrack.ksplice.com.
35
Installing the API Command-Line Tools
2. On the Settings page, select the Generate a new API key? check box and click Save Changes.
Note
1. Ensure that you have a valid Oracle Linux Premier subscription, a Premier Limited subscription, or an
Oracle Premier Support for Systems and Operating Systems subscription.
The previously listed subscriptions automatically register your system to use Oracle Ksplice. See
Section 1.3.2, “About Oracle Ksplice and ULN Registration” for more details.
The Python bindings are installed in the Python site-packages directory, which is typically /usr/lib/
python2.6/site-packages/ksplice. The API tools are installed in the /usr/bin directory.
Note
To view your API user name and API key, log into https://uptrack.ksplice.com and
then select the Settings tab.
36
About the uptrack-api-list Command
Alternatively, you can specify the --this-machine option if you are running the script on the machine
you want to check:
$ uptrack-api-describe -u api_username -k api_key --this-machine
qa.mydom.com (192.168.1.200)
Effective kernel: 2.6.18-194.8.1.el5
This machine is active
Last seen on 2010-09-15T12:43:07Z
OS status: Out of date:
* Install v8gacfip CVE-2010-2521: Remote buffer overflow in NFSv4 server.
* Install 3c4sopia CVE-2010-2226: Read access to write-only files in XFS filesystem.
* Install oiqwvltu CVE-2010-2240: Privilege escalation vulnerability in memory management.
You can also set the username and api_key variables in the UPTRACK_API_USERNAME and
UPTRACK_API_KEY environment variables, for example:
$ export [email protected]
$ export UPTRACK_API_KEY=3af3c2c1ec407feb0fdc9fc1d8c4460c
$ uptrack-api-describe --this-machine
In the previous example, protocol is either specified as http or https, username and password
authenticate you with the proxy (if required), and proxy and port are the host name/IP address and port
number that you use to connect to the proxy server, respectively.
The following example shows how you might specify this connection information:
37
About the API Implementation
https_proxy = http://proxy.example.com:3128/
These headers are not required currently, as the API supports only JSON-encoded data, but future
versions of the API might support additional data-encoding formats.
38
Supported API Requests
uptrack_client_version Is the version of the Uptrack client that the machine is running.
effective_kernel Ksplice has applied all of the important security and reliability updates
that are needed to bring the machine into line with this kernel version.
group The group to which the machine is assigned. You can also use the web
interface to manage machine groups.
original_kernel The kernel version of the machine before any Ksplice updates were
applied.
39
Interaction Sample
The POST /api/1/machine/$UUID/authorize API request authorizes the machine with the specified
UUID to access the Uptrack service if you have configured your account to deny access to new machines.
{authorized: boolean}
Specify the boolean argument as true to authorize the machine or false to revoke authorization.
The POST /api/1/machine/$UUID/group API request changes the group of the machine with the
specified UUID.
{group_name: string}
In the previous example, string is the name of the new group. The group is created if it does not already
exist. Note that if the account does not have a machine with the specified UUID, the request results in an
HTTP 404 error.
To remove a machine from a group, you can set the group to a different name, or you can specify an
empty string for no group.
This conversation takes place with the server uptrack.api.ksplice.com over port 443 by using the
Secure Sockets Layer (SSL) protocol.
The following is a request for a list of registered machines that is made to the server:
The server authenticates the request and responds with a list of the machines, for example:
HTTP/1.0 200 OK
Date: Mon, 03 May 2010 21:09:48 GMT
Content-Type: application/json
40
Configuring the check_uptrack Nagios Plugin
1. Set the username and api_key variables in the configuration file /etc/uptrack-api.conf under
an [uptrack] section heading, for example:
[uptrack]
username = [email protected]
api_key = 3af3c2c1ec407feb0fdc9fc1d8c4460c
2. If you access the Internet by using a proxy, specify the connection information in the [uptrack]
section of /etc/uptrack-api.conf:
https_proxy = [protocol://][username:password@]proxy[:port]
In the previous example, protocol is http or https, username and password authenticate you
with the proxy (if required), and proxy and port are host name/IP address and port that you use to
connect o the proxy server, respectively. The connection information you specify might be similar to the
following:
https_proxy = http://proxy.example.com:3128/
3. Configure the check_uptrack plugin in the Nagios configuration file, which is usually /usr/local/
nagios/etc/nagios.cfg.
define service {
host_name uptrack-service
service_description Ksplice Uptrack Update Status
check_command check_uptrack
notifications_enabled 1
normal_check_interval 60
retry_check_interval 15
max_check_attempts 4
notification_options w,c,r
contacts server-admins
}
define command {
command_name check_uptrack
command_line /usr/lib/nagios/plugins/check_uptrack
}
41
Using the Nagios Plugins
define command {
command_name check_uptrack_opts
command_line /usr/lib/nagios/plugins/check_uptrack -w $ARG1$ -c $ARG2$
}
The previous command produces a summary of your machines in the standard Nagios plug-in format, as
shown in the following example:
2 machines are OUTOFDATE!|uptodate=1280;outofdate=1;unsupported=0;inactive=3
prod1.mydom.com (192.168.1.1) is OUTOFDATE
prod2.mydom.com (192.168.1.2) is OUTOFDATE
If you specify the -c or -w options with a comma-separated list of the arguments that also specify the i, o,
or u options for inactive, out-of-date, or unsupported machines, the check_uptrack command displays
critical or warning notices for machines that match the criteria.
For example, the following command returns warning notices for any machines that are inactive or
unsupported, as well as critical notices for any machines that are out of date:
/usr/lib/nagios/plugins/check_uptrack -w u,i -c o
The output from the check_uptrack_local command is similar to the output from the check_uptrack
command. However, for out-of-date machines, the command also lists the updates that are required to
bring the machine up to date.
Note
42