Commit Graph

32 Commits

Author SHA1 Message Date
shiyunfei 1bca2b6443 kernel_linux_5.10 master 分支已合入CVE同步至NewIP
https://gitee.com/openharmony/kernel_linux_5.10/pulls/1348
https://gitee.com/openharmony/kernel_linux_5.10/pulls/531

Signed-off-by: shiyunfei <shiyunfei3@huawei.com>
2024-04-24 17:16:40 +08:00
shiyunfei 76cf7624ed 适配OH蓝区kernel_linux_5.10仓社区LTS补丁升级,使用dst_hold替换dst_hold_and_use
Signed-off-by: shiyunfei <shiyunfei3@huawei.com>
2024-02-01 17:05:35 +08:00
shiyunfei 3d7e91bb32 解决sk->sk_send_head指针可能使用已释放skb的问题
Signed-off-by: shiyunfei <shiyunfei3@huawei.com>
2024-01-09 17:35:48 +08:00
shiyunfei e2167fd037 newip tcp add RFC 5961 5.2
Signed-off-by: shiyunfei <shiyunfei3@huawei.com>
2023-12-26 18:47:06 +08:00
liangbotong 3d3dedb3ce Fix the icmp parsing error of wireshark_cfg_for_newip.lua
Signed-off-by: liangbotong <liangbotong@huawei.com>
2023-09-26 10:48:30 +08:00
liangbotong b6cbb5509c add compat_nip_dev_ifconf
Signed-off-by: liangbotong <liangbotong@huawei.com>
2023-09-20 10:51:06 +08:00
liangbotong 62de3a0967 ninet_ioctl add the SIOCGIFCONF
Signed-off-by: liangbotong <liangbotong@huawei.com>
2023-09-19 15:53:17 +08:00
liangbotong e4d16ee37d Resolve the getsockopt TCP_MD5SIG null pointer reference problem
Signed-off-by: liangbotong <liangbotong@huawei.com>
2023-09-11 15:47:20 +08:00
liangbotong 157182c68e Resolve the NEWIP null pointer reference problem
Signed-off-by: liangbotong <liangbotong@huawei.com>
2023-09-05 19:59:05 +08:00
liangbotong 65eed81296 Resolved read out of bounds caused by skb_len flip
Signed-off-by: liangbotong <liangbotong@huawei.com>
2023-08-31 16:35:18 +08:00
liangbotong ca107c3348 Improve input parameter validation and fix some code style issues in newip
Signed-off-by: liangbotong <liangbotong@huawei.com>
2023-08-28 20:19:07 +08:00
liangbotong fb564f4389 NewIP code security issue remediation
1.Resolve stack overflow issue in parsing ICMP packets in newip.
2.Resolve negative overflow issue in parsing UDP packets in newip.
3.Resolve unchecked data reception issue in nip_rcv.

Signed-off-by: liangbotong <liangbotong@huawei.com>
2023-08-28 10:27:42 +08:00
liangbotong 226f419a33 Add NewIP debug log
Signed-off-by: liangbotong <liangbotong@huawei.com>
2023-08-21 13:07:11 +08:00
liangbotong 881f73c50c fix NewIP coding style problem
Signed-off-by: liangbotong <liangbotong@huawei.com>
2023-08-03 11:52:14 +08:00
liangbotong bbe2a7288c Performance Optimization of NewIP Congestion Control Algorithm
1. NewIP dynamic rto
2. bw window control

Signed-off-by: liangbotong <liangbotong@huawei.com>
2023-08-01 14:35:35 +08:00
liangbotong 04a1eab82e NewIP config file and NS modification
1.config NewIP HOOKS are enabled by default.
2.Use unicast to send NS to update the status of neighbor table entries.

Signed-off-by: liangbotong <liangbotong@huawei.com>
2023-07-03 17:00:47 +08:00
liangbotong 0586699f1c NewIP code problem modification
1.add HCK lite vendor hook for NewIP
2.Code specification check and rectify

Signed-off-by: liangbotong <liangbotong@huawei.com>
2023-06-29 11:39:44 +08:00
openharmony_ci 1cbe2a4957 !27 btdev code view problem modification, debug rectification
Merge pull request !27 from YangYanJun/master
2023-06-20 13:54:28 +00:00
liangbotong 15037e930b NewIP code problem modification
1.Add the log information about the NewIP route exception branch
2.Code specification check and rectify

Signed-off-by: liangbotong <liangbotong@huawei.com>
2023-06-19 20:08:40 +08:00
yangyanjun 0050a26b5b btdev code view problem modification, debug rectification
1. bt_io_file_write function call copy_from_user branch failure need to release skb.
2. The branch that bt_io_file_read fails to call copy_to_user needs to release skb, because skb has been unchained from ring buf.
3. The bt_cmd_peek_packet function only obtains the skb data length. After put_user fails, the skb does not need to be released.
4. The bt_cmd_create_virnet function bt_get_unused_id may return an invalid id, and add the if judgment that the id is less than 0.
5. The branch of bt_cmd_create_virnet function copy_to_user that fails needs to release bt_table_remove_device.
6. bt_table_add_device and bt_table_remove_device functions to tbl->num variable ++ and -- operation to increase the validity judgment, avoid flipping.
7. __bt_ring_create function if (unlikely(size < 0)) branch has memory leaks, modified to determine the validity of the input parameter, and then apply for memory.
8. Both bt_ring_is_empty and bt_ring_is_full return true for invalid branches.
9. bt_virnet_produce_data adds a memory barrier before and after calling bt_ring_produce, and bt_ring_produce already has a memory barrier. Delete the redundant memory barrier.
10. The vnet->tx_queue variable is a redundant operation and has no practical effect. Delete all codes corresponding to the variable to improve the efficiency of receiving and sending packets on the btdev virtual device.
   bt_virnet_create deletes init_waitqueue_head(&vnet->tx_queue);
   bt_io_file_poll deletes poll_wait(filp, &vnet->tx_queue, wait);
11. Change the global variable name to g_xxx
12. atomic operation process xx_open_limit variable value changes add annotation
13. debug rectification, the normal path is closed by default (shell can be opened), and the abnormal path is opened by default. At the same time, key information such as btdev interface name printing and data length are added to the interface open, delete, and packet sending functions.

Signed-off-by: yangyanjun <yangyanjun@huawei.com>
2023-06-19 20:00:05 +08:00
liangbotong e07521c607 security remediation of NewIP code
Signed-off-by: liangbotong <liangbotong@huawei.com>
2023-06-15 11:41:25 +08:00
liangbotong 5724c78633 NewIP rto and license adjustment
1. The header comment contains the copyright license, feature description, author, and creation date.
2. The NewIP rto is changed to 20.

Signed-off-by: liangbotong <liangbotong@huawei.com>
2023-06-08 09:48:28 +08:00
liangbotong eaadb5db4d add nip_addr.h license
add "WITH Linux-syscall-note" for nip_addr.h license

Signed-off-by: liangbotong <liangbotong@huawei.com>
2023-06-01 13:49:05 +08:00
liangbotong 74df9caea1 adjust the NewIP ioctl entry
avoiding memory leaks caused by CAP_NET_ADMIN

Signed-off-by: liangbotong <liangbotong@huawei.com>
2023-05-31 17:06:22 +08:00
liangbotong fcdfd42898 add annotating code for NewIp vendor hooks
Signed-off-by: liangbotong <liangbotong@huawei.com>
2023-05-26 10:23:30 +08:00
liangbotong 2717358eda NewIP code rectification
1. The header comment contains the copyright license, feature description, author, and creation date
2. Rectification of code specification problems

Signed-off-by: liangbotong <liangbotong@huawei.com>
2023-05-25 20:28:57 +08:00
liangbotong 924323cbcc btdev code rectification
1. The header comment contains the copyright license, feature description, author, and creation date
2. Rectification of deep nesting of code blocks of functions
3. Rectification of code specification problems
4. Rectify resource leakage
5. Rectifying reliability risks

Signed-off-by: liangbotong <liangbotong@huawei.com>
2023-05-22 16:19:39 +08:00
yangyanjun 926efc535b newip开源合规评审问题修改
Signed-off-by: yangyanjun <yangyanjun@huawei.com>
2023-04-21 16:29:00 +08:00
liangbotong c23f7b8ffc Fix NewIP route issues and btdev Makefile
Fix the issue that a network port can add a route or address when it is not running.

The btdev Makefile adds a conditional compilation.

Signed-off-by: liangbotong <liangbotong@huawei.com>
2023-04-20 10:58:50 +08:00
shiyunfei a83d703dba Fix NewIP ofo and SELinux issues
Fix ofo last_skb cover new_skb Processing.

Fix the issue of NewIP socket SELinux object role not being marked.

Signed-off-by: shiyunfei <shiyunfei3@huawei.com>
2023-04-13 14:14:02 +08:00
liangbotong cdab0f7f60 Modify related scripts and files according to the directory structure
Signed-off-by: liangbotong <liangbotong@huawei.com>
2023-04-07 11:31:22 +08:00
yangyanjun 426276113e add New IP protocol stack
Signed-off-by: yangyanjun <yangyanjun@huawei.com>
2023-04-03 16:57:06 +08:00