Skip to content
Heist/ feed
Unrated

tcp_bpf: fix return value of tcp_bpf_sendmsg()

Type: advisorySource: Official CVE List1 source record

In the Linux kernel, the following vulnerability has been resolved: tcp_bpf: fix return value of tcp_bpf_sendmsg() When we cork messages in psock->cork, the last message triggers the flushing will result in sending a sk_msg larger than the current message size. In this case, in tcp_bpf_send_verdict(), 'copied' becomes negative at least in the following case: 468 case __SK_DROP: 469 default: 470 sk_msg_free_partial(sk, msg, tosend); 471 sk_msg_apply_bytes(psock, tosend); 472 *copied -= (tosend + delta); // <==== HERE 473 return -EACCES; Therefore, it could lead to the following BUG with a proper value of 'copied' (thanks to syzbot). We should not use negative 'copied' as a return value here. ------------[ cut here ]------------ kernel BUG at net/socket.c:733! Internal error: Oops - BUG: 00000000f2000800 [#1] PREEMPT SMP Modules linked in: CPU: 0 UID: 0 PID: 3265 Comm: syz-executor510 Not tainted 6.11.0-rc3-syzkaller-00060-gd07b43284ab3 #0 Hardware name: linux,dummy-virt (DT) pstate: 61400009 (nZCv daif +PAN -UAO -TCO +DIT -SSBS BTYPE=--) pc : sock_sendmsg_nosec net/socket.c:733 [inline] pc : sock_sendmsg_nosec net/socket.c:728 [inline] pc : __sock_sendmsg+0x5c/0x60 net/socket.c:745 lr : sock_sendmsg_nosec net/socket.c:730 [inline] lr : __sock_sendmsg+0x54/0x60 net/socket.c:745 sp : ffff800088ea3b30 x29: ffff800088ea3b30 x28: fbf00000062bc900 x27: 0000000000000000 x26: ffff800088ea3bc0 x25: ffff800088ea3bc0 x24: 0000000000000000 x23: f9f00000048dc000 x22: 0000000000000000 x21:

Announced Source revision 1
Original source ↗

CVE-2024-46783

Primary source · Revision 1

Imported from structured advisory data. Source references identify upstream records or fields; verify affected versions and your deployed configuration.

Security context

Source reference: cve:CVE-2024-46783

Linux

Source reference: /containers/cna/affected/0/product

Affected versions
Not stated in this record
Fixed versions
Not stated in this record
Prerequisites
Not stated in this record

Linux

Source reference: /containers/cna/affected/1/product

Affected versions
Not stated in this record
Fixed versions
Not stated in this record
Prerequisites
Not stated in this record

Structured affected-version data

Original package identities and version rules from this source.

[
  {
    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
    "vendor": "Linux",
    "product": "Linux",
    "versions": [
      {
        "status": "affected",
        "version": "4f738adba30a7cfc006f605707e7aee847ffefa0",
        "lessThan": "6f9fdf5806cced888c43512bccbdf7fefd50f510",
        "versionType": "git"
      },
      {
        "status": "affected",
        "version": "4f738adba30a7cfc006f605707e7aee847ffefa0",
        "lessThan": "3efe53eb221a38e207c1e3f81c51e4ca057d50c2",
        "versionType": "git"
      },
      {
        "status": "affected",
        "version": "4f738adba30a7cfc006f605707e7aee847ffefa0",
        "lessThan": "78bb38d9c5a311c5f8bdef7c9557d7d81ca30e4a",
        "versionType": "git"
      },
      {
        "status": "affected",
        "version": "4f738adba30a7cfc006f605707e7aee847ffefa0",
        "lessThan": "810a4e7d92dea4074cb04c25758320909d752193",
        "versionType": "git"
      },
      {
        "status": "affected",
        "version": "4f738adba30a7cfc006f605707e7aee847ffefa0",
        "lessThan": "c8219a27fa43a2cbf99f5176f6dddfe73e7a24ae",
        "versionType": "git"
      },
      {
        "status": "affected",
        "version": "4f738adba30a7cfc006f605707e7aee847ffefa0",
        "lessThan": "126d72b726c4cf1119f3a7fe413a78d341c3fea9",
        "versionType": "git"
      },
      {
        "status": "affected",
        "version": "4f738adba30a7cfc006f605707e7aee847ffefa0",
        "lessThan": "fe1910f9337bd46a9343967b547ccab26b4b2c6e",
        "versionType": "git"
      }
    ],
    "programFiles": [
      "net/ipv4/tcp_bpf.c"
    ],
    "defaultStatus": "unaffected"
  },
  {
    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
    "vendor": "Linux",
    "product": "Linux",
    "versions": [
      {
        "status": "affected",
        "version": "4.17"
      },
      {
        "status": "unaffected",
        "version": "0",
        "lessThan": "4.17",
        "versionType": "semver"
      },
      {
        "status": "unaffected",
        "version": "5.4.284",
        "versionType": "semver",
        "lessThanOrEqual": "5.4.*"
      },
      {
        "status": "unaffected",
        "version": "5.10.226",
        "versionType": "semver",
        "lessThanOrEqual": "5.10.*"
      },
      {
        "status": "unaffected",
        "version": "5.15.167",
        "versionType": "semver",
        "lessThanOrEqual": "5.15.*"
      },
      {
        "status": "unaffected",
        "version": "6.1.110",
        "versionType": "semver",
        "lessThanOrEqual": "6.1.*"
      },
      {
        "status": "unaffected",
        "version": "6.6.51",
        "versionType": "semver",
        "lessThanOrEqual": "6.6.*"
      },
      {
        "status": "unaffected",
        "version": "6.10.10",
        "versionType": "semver",
        "lessThanOrEqual": "6.10.*"
      },
      {
        "status": "unaffected",
        "version": "6.11",
        "versionType": "original_commit_for_fix",
        "lessThanOrEqual": "*"
      }
    ],
    "programFiles": [
      "net/ipv4/tcp_bpf.c"
    ],
    "defaultStatus": "affected"
  }
]
Related CVEs
CVE-2024-46783

Source reference: /cveMetadata/cveId

Publisher severity

No explicit severity was provided.

Event
#26719 · Revision 1
Added to Heist Feed
Publisher date
Read the original announcement