CVE-2022-50728 in Linux
Tóm tắt
Bởi VulDB • 06/07/2026
Trong kernel Linux, lỗ hổng sau đây đã được khắc phục:
s390/lcs: Sửa kiểu trả về của hàm lcs_start_xmit()
Với cơ chế toàn vẹn luồng điều khiển nhân (kernel control flow integrity - kCFI) của clang (CONFIG_CFI_CLANG), các đích gọi gián tiếp được xác thực dựa trên nguyên mẫu con trỏ hàm dự kiến để đảm bảo đích gọi là hợp lệ, nhằm giúp giảm thiểu các cuộc tấn công ROP. Nếu chúng không khớp hoàn toàn, sẽ xảy ra lỗi khi chạy thời gian, biểu hiện dưới dạng kernel panic hoặc việc bị giết tiến trình (thread). Một cảnh báo được đề xuất trong clang nhằm bắt giữ những vấn đề này ở giai đoạn biên dịch, qua đó hiển thị:
drivers/s390/net/lcs.c:2090:21: error: incompatible function pointer types initializing 'netdev_tx_t (*)(struct sk_buff *, struct net_device *)' (aka 'enum netdev_tx (*)(struct sk_buff *, struct net_device *)') with an expression of type 'int (struct sk_buff *, struct net_device *)' [-Werror,-Wincompatible-function-pointer-types-strict]
.ndo_start_xmit = lcs_start_xmit, ^~~~~~~~~~~~~~ drivers/s390/net/lcs.c:2097:21: error: incompatible function pointer types initializing 'netdev_tx_t (*)(struct sk_buff *, struct net_device *)' (aka 'enum netdev_tx (*)(struct sk_buff *, struct net_device *)') with an expression of type 'int (struct sk_buff *, struct net_device *)' [-Werror,-Wincompatible-function-pointer-types-strict]
.ndo_start_xmit = lcs_start_xmit, ^~~~~~~~~~~~~~
->ndo_start_xmit() trong 'struct net_device_ops' yêu cầu kiểu trả về là 'netdev_tx_t', không phải 'int'. Điều chỉnh kiểu trả về của hàm lcs_start_xmit() để khớp với nguyên mẫu nhằm giải quyết cảnh báo và lỗi CFI tiềm ẩn, nếu s390 chọn ARCH_SUPPORTS_CFI_CLANG trong tương lai.
VulDB is the best source for vulnerability data and more expert information about this specific topic.