故障描述:
云主机无法 SSH 及 ping 通, 端口开启. VNC 中有大量 "backlog limit exceeded" 的提示
- audit:backlog limit exceeded
- audit:audit_backlog=321> audit_backlog_limit=320
处理过程:
根具提示 "audit_backlog=321> audit_backlog_limit=320", 本问题锁定在, audit 服务在繁忙的系统中进行审计事件操作, 缓冲瓶颈!
- # Less/var/log/audit/audit.log
- Dec 15 03:24:46 saslauthd[5892]: do_auth : auth failure: [ mailto:user=test@cto.com ] [service=smtp] [realm=cto.com] [mech=pam] [reason=PAM autherror]
- Dec 15 03:25:15 saslauthd[5890]: do_auth : auth failure: [ mailto:user=test@cto.com ] [service=smtp] [realm=cto.com] [mech=pam] [reason=PAM autherror]
- Dec 15 03:25:45 saslauthd[5889]: do_auth : auth failure: [ mailto:user=test@cto.com ] [service=smtp] [realm=cto.com] [mech=pam] [reason=PAM autherror]
- # dmesg |grep -i error
- i8042: probe of i8042 failed with error -5
结论:
Linux 2.6 内核有用日志记录事件的能力, 比如记录系统调用和文件访问. 然后, 管理员可以评审这些日志, 确定可能存在的安全裂口, 比如失败的登录尝试, 或者 用户对系统文件不成功的访问. 这种功能称为 Linux 审计系统. RedHat 5.x 版本中已经可用. 配置文件 / etc/audit/auditd.conf 记录了日志位置, 磁盘空间等配置信息, 当出现问题, 优先排查配置参数是否存在性能瓶颈! 然后在通过排查安全情况.
规避方法:
修改 audit 缓冲区大小参数, 默认为 64:
- [root@ www.ctohome.com]# auditctl -b 8192
- AUDIT_STATUS: enabled=1 flag=1 pid=6118 rate_limit=0 backlog_limit=8192 lost=0 backlog=1
其他:
启动 audit:
检查进程:# ps -ef | grep audit*
启动 audit:# auditd
开启关闭
Enable/disable:# auditctl -e 0/1
来源: https://www.qcloud.com/developer/article/1656649