In the Linux kernel, the following vulnerability has been resolved:
ocfs2: pass u64 to ocfs2truncateinline maybe overflow
Syzbot reported a kernel BUG in ocfs2truncateinline. There are two reasons for this: first, the parameter value passed is greater than ocfs2maxinlinedatawithxattr, second, the start and end parameters of ocfs2truncate_inline are "unsigned int".
So, we need to add a sanity check for bytestart and bytelen right before ocfs2truncateinline() in ocfs2removeinoderange(), if they are greater than ocfs2maxinlinedatawithxattr return -EINVAL.
[
{
"signature_type": "Line",
"deprecated": false,
"digest": {
"line_hashes": [
"202952106098289941083583918358968050232",
"303004706658995824032681383299503703019",
"261419174594569827089659123096484497754",
"63565265123456373796122161985041914310"
],
"threshold": 0.9
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@ecd62f684386fa64f9c0cea92eea361f4e6444c2",
"target": {
"file": "fs/ocfs2/file.c"
},
"id": "CVE-2024-50218-0d0b409b"
},
{
"signature_type": "Line",
"deprecated": false,
"digest": {
"line_hashes": [
"202952106098289941083583918358968050232",
"303004706658995824032681383299503703019",
"261419174594569827089659123096484497754",
"63565265123456373796122161985041914310"
],
"threshold": 0.9
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@2fe5d62e122b040ce7fc4d31aa7fa96ae328cefc",
"target": {
"file": "fs/ocfs2/file.c"
},
"id": "CVE-2024-50218-2002abfa"
},
{
"signature_type": "Function",
"deprecated": false,
"digest": {
"length": 2290.0,
"function_hash": "135595740320342006752883802768913085196"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@70767689ec6ee5f05fb0a2c17d7ec1927946e486",
"target": {
"file": "fs/ocfs2/file.c",
"function": "ocfs2_remove_inode_range"
},
"id": "CVE-2024-50218-204d543f"
},
{
"signature_type": "Function",
"deprecated": false,
"digest": {
"length": 2290.0,
"function_hash": "135595740320342006752883802768913085196"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@2fe5d62e122b040ce7fc4d31aa7fa96ae328cefc",
"target": {
"file": "fs/ocfs2/file.c",
"function": "ocfs2_remove_inode_range"
},
"id": "CVE-2024-50218-2c4d37d4"
},
{
"signature_type": "Function",
"deprecated": false,
"digest": {
"length": 2290.0,
"function_hash": "135595740320342006752883802768913085196"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@ecd62f684386fa64f9c0cea92eea361f4e6444c2",
"target": {
"file": "fs/ocfs2/file.c",
"function": "ocfs2_remove_inode_range"
},
"id": "CVE-2024-50218-30755885"
},
{
"signature_type": "Line",
"deprecated": false,
"digest": {
"line_hashes": [
"202952106098289941083583918358968050232",
"303004706658995824032681383299503703019",
"261419174594569827089659123096484497754",
"63565265123456373796122161985041914310"
],
"threshold": 0.9
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@88f97a4b5843ce21c1286e082c02a5fb4d8eb473",
"target": {
"file": "fs/ocfs2/file.c"
},
"id": "CVE-2024-50218-44070b82"
},
{
"signature_type": "Function",
"deprecated": false,
"digest": {
"length": 2290.0,
"function_hash": "135595740320342006752883802768913085196"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@0b6b8c2055784261de3fb641c5d0d63964318e8f",
"target": {
"file": "fs/ocfs2/file.c",
"function": "ocfs2_remove_inode_range"
},
"id": "CVE-2024-50218-44659774"
},
{
"signature_type": "Line",
"deprecated": false,
"digest": {
"line_hashes": [
"202952106098289941083583918358968050232",
"303004706658995824032681383299503703019",
"261419174594569827089659123096484497754",
"63565265123456373796122161985041914310"
],
"threshold": 0.9
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@27d95867bee806cdc448d122bd99f1d8b0544035",
"target": {
"file": "fs/ocfs2/file.c"
},
"id": "CVE-2024-50218-4a12f5d2"
},
{
"signature_type": "Function",
"deprecated": false,
"digest": {
"length": 2290.0,
"function_hash": "135595740320342006752883802768913085196"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@95fbed8ae8c32c0977e6be1721c190d8fea23f2f",
"target": {
"file": "fs/ocfs2/file.c",
"function": "ocfs2_remove_inode_range"
},
"id": "CVE-2024-50218-5f149b45"
},
{
"signature_type": "Line",
"deprecated": false,
"digest": {
"line_hashes": [
"202952106098289941083583918358968050232",
"303004706658995824032681383299503703019",
"261419174594569827089659123096484497754",
"63565265123456373796122161985041914310"
],
"threshold": 0.9
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@bc0a2f3a73fcdac651fca64df39306d1e5ebe3b0",
"target": {
"file": "fs/ocfs2/file.c"
},
"id": "CVE-2024-50218-65823e48"
},
{
"signature_type": "Function",
"deprecated": false,
"digest": {
"length": 2290.0,
"function_hash": "135595740320342006752883802768913085196"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@27d95867bee806cdc448d122bd99f1d8b0544035",
"target": {
"file": "fs/ocfs2/file.c",
"function": "ocfs2_remove_inode_range"
},
"id": "CVE-2024-50218-84370e51"
},
{
"signature_type": "Function",
"deprecated": false,
"digest": {
"length": 2290.0,
"function_hash": "135595740320342006752883802768913085196"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@bc0a2f3a73fcdac651fca64df39306d1e5ebe3b0",
"target": {
"file": "fs/ocfs2/file.c",
"function": "ocfs2_remove_inode_range"
},
"id": "CVE-2024-50218-84b3657c"
},
{
"signature_type": "Line",
"deprecated": false,
"digest": {
"line_hashes": [
"202952106098289941083583918358968050232",
"303004706658995824032681383299503703019",
"261419174594569827089659123096484497754",
"63565265123456373796122161985041914310"
],
"threshold": 0.9
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@0b6b8c2055784261de3fb641c5d0d63964318e8f",
"target": {
"file": "fs/ocfs2/file.c"
},
"id": "CVE-2024-50218-96d47214"
},
{
"signature_type": "Function",
"deprecated": false,
"digest": {
"length": 2290.0,
"function_hash": "135595740320342006752883802768913085196"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@88f97a4b5843ce21c1286e082c02a5fb4d8eb473",
"target": {
"file": "fs/ocfs2/file.c",
"function": "ocfs2_remove_inode_range"
},
"id": "CVE-2024-50218-a4dfc7d0"
},
{
"signature_type": "Line",
"deprecated": false,
"digest": {
"line_hashes": [
"202952106098289941083583918358968050232",
"303004706658995824032681383299503703019",
"261419174594569827089659123096484497754",
"63565265123456373796122161985041914310"
],
"threshold": 0.9
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@95fbed8ae8c32c0977e6be1721c190d8fea23f2f",
"target": {
"file": "fs/ocfs2/file.c"
},
"id": "CVE-2024-50218-a5a251ab"
},
{
"signature_type": "Line",
"deprecated": false,
"digest": {
"line_hashes": [
"202952106098289941083583918358968050232",
"303004706658995824032681383299503703019",
"261419174594569827089659123096484497754",
"63565265123456373796122161985041914310"
],
"threshold": 0.9
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@70767689ec6ee5f05fb0a2c17d7ec1927946e486",
"target": {
"file": "fs/ocfs2/file.c"
},
"id": "CVE-2024-50218-a623a86a"
}
]