- 0. 起因
- 1. 获取补丁
- 1.1 下载kernel
- 1.2 下载PATCH
- 2. 更新补丁
- 2.1 上传补丁并解压
- 2.2 升级gcc
- 2.3 升级kernel
- 4. 错误排除
- 4.1 错误1:
- 4.2 错误2
- 4.3 错误3
有位好友求助需要更新CVE-2021-43267漏洞,不知道怎么操作.
第一反应直接升级kernel,但看了对方给的修复建议,想试试第二种方式修复.
说实话这种方式比直接用升级kernel复杂的多.直接升级kernel参见:
https://blog.csdn.net/qq_29974229/article/details/119350006
操作系统版本:Centos7.9
mkdir patch cd patch yum install patch xz bison flex make automake gcc gcc-c++ g++ ncurses ncurses-dev ncurses-devel fakeroot wget bzip2 make patch ftp qemu -y xz -dk patch-5.14.16-rc1.xz tar xf linux-5.14.16.tar.gz2.2 升级gcc
wget http://ftp.gnu.org/gnu/gcc/gcc-4.9.0/gcc-4.9.0.tar.bz2 tar xf gcc-4.9.0.tar.bz2 cd gcc-4.9.0 ./contrib/download_prerequisites mkdir build cd build ../configure --enable-checking=release --enable-languages=c,c++ --disable-multilib make -j 4 make install2.3 升级kernel
cd linux-5.14.16 patch -p1 < ../patch-5.14.16-rc1
这里挺烦的,一路y和回车.有知道可以自动过的兄弟给我留个言.
cat Makefile.rej
make allnoconfig make cp /usr/lib/modules/5.14.16/modules.order ./ make modules_install make install
悲剧~~~~~~
/bin/sh: flex: command not found make[2]: *** [scripts/kconfig/lexer.lex.c] Error 127 make[1]: *** [allnoconfig] Error 2 make: *** [__sub-make] Error 2
解决方法:
yum install -y bison flex4.2 错误2
scripts/Kconfig.include:44: Sorry, this compiler is not supported. make[2]: *** [allnoconfig] Error 1 make[1]: *** [allnoconfig] Error 2 make: *** [__sub-make] Error 2
解决方法升级gcc到4.9.0



