Skip to content

2016.11 Security Fixes#5

Open
JJL772 wants to merge 16 commits into
br-2016.11from
br-2016.11-lorelli-dev
Open

2016.11 Security Fixes#5
JJL772 wants to merge 16 commits into
br-2016.11from
br-2016.11-lorelli-dev

Conversation

@JJL772

@JJL772 JJL772 commented Jun 28, 2024

Copy link
Copy Markdown
Member

Somewhat chunky PR, changes summarized below. Nearly the same as the 2019.08 PR.

Removed Software

telnetd

Telnet daemon has been removed. IT doesn't want us using telnet since it's an insecure protocol and we have ssh anyways.

New Software

sudo

Added sudo to allow for certain scripts to match between centos7-lite and this image. For example, sudo chrt works passwordless on both of these images.

/etc/sudoers is setup to give laci, flaci, acctf and spear passwordless access to chrt, poweroff, shutdown and reboot

perf

This was added to allow an engineer in TID to profile an IOC. It's probably useful to have in our toolbox on buildroot.

util-linux

Mostly for the prlimit utility.

Software Upgrades (over 2016.11.1 package versions)

Package Old Version New Version Reason
dropbear 2016.74 2024.85 Request from IT. Also has support for modern ciphers like ED25519 and ECDSA, which should be preferred over RSA
ntp 4.2.8p8 4.2.8p18 Request from IT. Reverted due to ntpd crashes
sudo 1.8.15 1.9.15p5 Several CVEs reported on old versions of sudo, ensure it is on the latest version

Changes by Eric and Mike

  • Disabled telnetd
  • Added /etc/SLAC_properties
  • Added a root password
  • Allow chrt to be run without root
  • Added acctf and flaci users

Other Changes

  • Generated ecdsa and ed25519 keys for use with the new version of dropbear. This should fix the "Host identification has changed" message you get after rebooting a LinuxRT system. The previous version of dropbear has support for RSA and ECDSA, but only an RSA host key was generated. Dropbear would then generate an ECDSA host key at runtime in /etc/ which would of course never be saved.
  • Added QEMU launch scripts for debugging the image locally
  • Added a basic test script for validating the image on hardware (scripts/tests.sh)
  • Assume all patches are forwards with -N to avoid playing 20 questions with the installconf script when re-patching.
  • Strip -dirty postfix from buildroot version to fix dev builds

Where was this tested?

  • cpu-b15-mg01

Mike Puckett and others added 16 commits February 26, 2024 14:19
2016-11.1-x86_64 complete.

The changes are as follows. First, new/deleted files:

    .gitignore
    fs_skeleton/etc/SLAC_properties
    fs_skeleton/etc/busybox.conf
    fs_skeleton/etc/init.d/S45telnetd

The .gitignore file just has changes dealing with the fact that I use
BBEdit on the Mac to edit with and it creates meta-data files about any
of the files I've edited (to do things like retain window positions,
etc...).

The SLAC_properties, busybox.conf, and S45telnetd files were completed
during the RC1-RC3 phase but were never checked in.

The modified files are as follows:

    config/bb-1.25.x.config
    config/br-2016.11.1-common.config
    device_table.txt
    fs_skeleton/etc/group
    fs_skeleton/etc/passwd
    fs_skeleton/etc/shadow
    scripts/save-version-info.sh

The bb-1.25.x.config file was updated by using `make
busybox-menuconfig`. The only thing that actually changed was the
setting to disable telnetd and the setting to enable SUID capability,
which we're applying to chrt. You have to copy the entire .config file
that is constructed using `make busybox-menuconfig` to the site's
bb-1.25.x.config file.

The br-2016.11.1-common.config was constructed using `make menuconfig`,
and the only thing that was done was to say that we wanted SHA-256 for
password hashing rather than MD5. That creates a .config file but you
have to compare the changes from the new .config file with the previous
.config.old file, and then just add the changes between those two to
br-2016.11.1-common.config file.

The device_table.txt file, etc/group, etc/passwd, and etc/shadow files
all came from the RC1-RC3 deployments but were never checked in.

The save-version-info.sh file has a problem where some information for
the build itself, using git to construct it, no longer works. For now,
those items were just commented out.
2016-11.1-x86_64 complete.

The changes are as follows. First, new/deleted files:

    .gitignore
    fs_skeleton/etc/SLAC_properties
    fs_skeleton/etc/busybox.conf
    fs_skeleton/etc/init.d/S45telnetd

The .gitignore file just has changes dealing with the fact that I use
BBEdit on the Mac to edit with and it creates meta-data files about any
of the files I've edited (to do things like retain window positions,
etc...).

The SLAC_properties, busybox.conf, and S45telnetd files were completed
during the RC1-RC3 phase but were never checked in.

The modified files are as follows:

    config/bb-1.25.x.config
    config/br-2016.11.1-common.config
    device_table.txt
    fs_skeleton/etc/group
    fs_skeleton/etc/passwd
    fs_skeleton/etc/shadow
    scripts/save-version-info.sh

The bb-1.25.x.config file was updated by using `make
busybox-menuconfig`. The only thing that actually changed was the
setting to disable telnetd and the setting to enable SUID capability,
which we're applying to chrt. You have to copy the entire .config file
that is constructed using `make busybox-menuconfig` to the site's
bb-1.25.x.config file.

The br-2016.11.1-common.config was constructed using `make menuconfig`,
and the only thing that was done was to say that we wanted SHA-256 for
password hashing rather than MD5. That creates a .config file but you
have to compare the changes from the new .config file with the previous
.config.old file, and then just add the changes between those two to
br-2016.11.1-common.config file.

The device_table.txt file, etc/group, etc/passwd, and etc/shadow files
all came from the RC1-RC3 deployments but were never checked in.

The save-version-info.sh file has a problem where some information for
the build itself, using git to construct it, no longer works. For now,
those items were just commented out.
This allows us to run poweroff, reboot and chrt with no password
'ssh -p 8022 laci@0.0.0.0' can be used for access
fixes an issue where OpenSSH clients complain about changing host identification
between reboots. By default OpenSSH (and probably other clients, too) use ecdsa
as the cipher. Since we did not have an ecdsa host key, and dropbear was run with
-R, dropbear would generate a new ecdsa host key that would not persist across
reboots.

Adding the ecdsa key avoids this issue.

ed25519 is not supported by the version of dropbear here, but I added the key
regardless for the next time we upgrade.
@JJL772
JJL772 force-pushed the br-2016.11-lorelli-dev branch from e3b1724 to 7d76fda Compare December 4, 2024 17:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants