TCP/IP option data aligement issue cause system broken
1 Problem Description
The field reports show that xxx panel will lockup and then reboot while doing security port scan by nmap.
2 Root Cause
After analysis, this problem happens at all panel versions, standalone/networking panel, and happens at other scanning tools (e.g. Tenable Nessus).
The investigation shows that, the problem was caused by unaligned data access during TCP timestamps option parsing in Linux kernel. The reason can be summarized below:
1) The ARMv5 or earlier MCU (likes xxx MCU S3C44B0X ARM7TDMI is belong to ARMv4T), who had limited abilities to access memory that was not aligned on a word (four byte) boundary. According to S3C44B0 datasheet (see page 89 Address Alignment), the MCU is going to ABORT mode which cause the system crash.
2) In Linux TCP option parsing, the handling did not consider the data unaligned in timestamp option, but TCP options are not guaranteed to be aligned at all.
According to the Linux debug output information when TCP package with timestamps options: The timestamps hold address (register: R8) is 0x0DB074E2, which is not multiple 4(word), the Linux kernel error information is: Unhandled fault: alignment exception (13).
1) TCP package by nmap
2) Linux debug output
3 Solution
The solution is get word value byte one byte when the address is unaligned, which is come from official Linux kernel patch (see appendix). The change is only applied for TCP/IP option parsing and without side effect. The solution had been successfully verified by prototype.
4 Appendix
The patch is come from Linux official, the link is https://archive.org/details/git-history-of-linux.
TCP/IP option data aligement issue cause system broken的更多相关文章
- TCP/IP OPTION字段
0x01 简介 TCP头部和IPV4头部除了固定的20字节外,都设置了 OPTION 字段用于存储自定义的数据,因为TCP头部和IPV4的报文长度字段均为4字节,所表示的最大值为15, 乘4,报文头部 ...
- [转] TCP/IP原理、基础以及在Linux上的实现
导言:本篇作为理论基础,将向我们讲述TCP/IP的基本原理以及重要的协议细节,并在此基础上介绍了TCP/IP在LINUX上的实现. OSI参考模型及TCP/IP参考模型 OSI模型(open syst ...
- TCP/IP协议族基本知识
常见的网络拓扑 两台主机通信的过程:应用进程产生消息,经由主机的 TCP/IP 协议栈发送到局域网(LAN),最后经过广域网(目前最大的广域网的因特网)中的网络设备(路由器)传给目的主机所在的局域网( ...
- Direct hosting of SMB over TCP/IP
http://support.microsoft.com/kb/204279 System TipThis article applies to a different version of Wind ...
- TCP/IP Four Layer Protocol Format Learning
相关学习资料 tcp-ip详解卷1:协议.pdf 目录 . 引言 . 应用层 . 传输层 . 网络层 0. 引言 协议中的网络字节序问题 在学习协议格式之前,有一点必须明白,否则我们在观察抓包数据的时 ...
- 计算机网络及TCP/IP知识点(全面,慢慢看)
TCP/IP网络知识点总结 一.总述 1.定义:计算机网络是一些互相连接的.自治的计算机的集合.因特网是网络的网络. 2.分类: 根据作用范围分类: 广域网 WAN (Wide Area Networ ...
- LINUX 中的 TCP/IP协议 参数详解
Ipsysctl tutorial 1.0.4 Prev Chapter 3. IPv4 variable reference Next https://www.frozentux.net/ipsys ...
- TCP/IP网络知识点总结
学完了计算机网络是时候整理一篇总结了,温故知新.注意:这篇博客很长长长(2.5万字+50图). TCP/IP网络知识点总结 一.总述 1.定义:计算机网络是一些互相连接的.自治的计算机的集合.因特网是 ...
- Introduction Sockets to Programming in C using TCP/IP
Introduction Computer Network: hosts, routers, communication channels Hosts run applications Routers ...
随机推荐
- hustoj 管理员和后台设置
之前用过hustoj 的livecd版本,觉得有一些小问题,所以从头到尾搭建.主要包含的过程包括: 安装ubuntu系统 搭建hustoj 管理员和后台资源建设 本文介绍如何在搭建好hustoj的基础 ...
- C++的string类型和继承C语言风格的字符串的区别与注意事项
1.尽可能地在C++程序中使用string,不要使用继承而来的C语言风格的字符串,会出现许多安全问题. 2.C语言的字符串风格,是以空字符结束的,在C++的头文件cstring中定义了C语言风格的字符 ...
- 单元测试UI
cnpm install -g --save mocha cnpm install -g --save chai cnpm install -g --save istanbul const {sho ...
- Android : 获取声卡信息的测试代码
完整的编译包(android平台): 链接:http://pan.baidu.com/s/1qXMTT7I 密码:2bow /* * ALSA parameter test program * * C ...
- WinPcap是用于网络封包抓取的一套工具
WinPcap是用于网络封包抓取的一套工具,可适用于32位的操作平台上解析网络封包,包含了核心的封包过滤,一个底层动态链接库,和一个高层系统函数库,及可用来直接存取封包的应用程序界面. Winpcap ...
- Entity Framework数据库初始化
public class ApplicationContext : DbContext { public DbSet<User> Users { get; set; } public Ap ...
- jquery 正则表达式
- 使用ext httpProxy代理获取列表但列表展示不全的问题解决
今天项目中遇到一个奇葩的事情,使用ext的jsonstore通过httpproxy代理想要获取一个列表,页面显示是有五条数据的但是却只展示了2条,于是各种排查,后台确定无误后开始检查前台,发现浏览器中 ...
- [AOP] 之让人一脸蒙哔的面向切面编程
最近接触到了面向切面编程,看来很多的文档,算是有一点点了解了,趁自己还有点印象,先把它们给写出来 什么是AOP AOP(Aspect-Oriented Programming), 即 面向切面编程. ...
- Day1作业及默写
1.简述变量命名规范 变量由字母, 数字,下划线搭配组合而成 不可以⽤数字开头,更不不能是全数字 不能是pythond的关键字, 这些符号和字母已经被python占⽤, 不可以更改 不要⽤中文 名字要 ...