398 Star 1.4K Fork 1.3K

GVPopenEuler / kernel

 / 详情

【openEuler 1.0-LTS】UBSAN: shift-out-of-bounds in net/ipv4/tcp_input.c:545:23

已完成
任务
创建于  
2023-04-17 14:30

【严重程度】 一般
【特性】
【重现类型】
【定位分析】


static void tcp_init_buffer_space(struct sock *sk)
{
int tcp_app_win = READ_ONCE(sock_net(sk)->ipv4.sysctl_tcp_app_win); //读取配置
struct tcp_sock *tp = tcp_sk(sk);
int maxwin;
....
maxwin = tcp_full_space(sk);


if (tp->window_clamp >= maxwin) {
tp->window_clamp = maxwin;


if (tcp_app_win && maxwin > 4 * tp->advmss)
tp->window_clamp = max(maxwin -
(maxwin >> tcp_app_win),//右移
4 * tp->advmss);
}
maxwin是个int类型的变量,右移有效范围是[0,31], 超出此范围则是未定义行为,会触发UBSAN告



【影响评估及测试建议】 None
【对外部影响描述】 None

评论 (1)

hulk-robot 创建了任务
openeuler-ci-bot 添加了
 
sig/Kernel
标签
Yuehaibing 修改了标题
Yuehaibing 修改了标题
zhangchangzhong 通过src-openeuler/kernel Pull Request !1019任务状态待办的 修改为已完成

登录 后才可以发表评论

状态
负责人
项目
里程碑
Pull Requests
关联的 Pull Requests 被合并后可能会关闭此 issue
分支
开始日期   -   截止日期
-
置顶选项
优先级
预计工期 (小时)
参与者(2)
5329419 openeuler ci bot 1632792936
C
1
https://gitee.com/openeuler/kernel.git
git@gitee.com:openeuler/kernel.git
openeuler
kernel
kernel

搜索帮助