{
    "dataType": "CVE_RECORD",
    "dataVersion": "5.1",
    "cveMetadata": {
        "cveId": "CVE-2021-47249",
        "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "state": "PUBLISHED",
        "assignerShortName": "Linux",
        "dateReserved": "2024-04-10T18:59:19.536Z",
        "datePublished": "2024-05-21T14:19:46.238Z",
        "dateUpdated": "2024-08-04T05:32:07.936Z"
    },
    "containers": {
        "cna": {
            "providerMetadata": {
                "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
                "shortName": "Linux",
                "dateUpdated": "2024-05-29T05:04:39.990Z"
            },
            "descriptions": [
                {
                    "lang": "en",
                    "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nnet: rds: fix memory leak in rds_recvmsg\n\nSyzbot reported memory leak in rds. The problem\nwas in unputted refcount in case of error.\n\nint rds_recvmsg(struct socket *sock, struct msghdr *msg, size_t size,\n\t\tint msg_flags)\n{\n...\n\n\tif (!rds_next_incoming(rs, &inc)) {\n\t\t...\n\t}\n\nAfter this \"if\" inc refcount incremented and\n\n\tif (rds_cmsg_recv(inc, msg, rs)) {\n\t\tret = -EFAULT;\n\t\tgoto out;\n\t}\n...\nout:\n\treturn ret;\n}\n\nin case of rds_cmsg_recv() fail the refcount won't be\ndecremented. And it's easy to see from ftrace log, that\nrds_inc_addref() don't have rds_inc_put() pair in\nrds_recvmsg() after rds_cmsg_recv()\n\n 1)               |  rds_recvmsg() {\n 1)   3.721 us    |    rds_inc_addref();\n 1)   3.853 us    |    rds_message_inc_copy_to_user();\n 1) + 10.395 us   |    rds_cmsg_recv();\n 1) + 34.260 us   |  }"
                }
            ],
            "affected": [
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "unaffected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "net/rds/recv.c"
                    ],
                    "versions": [
                        {
                            "version": "bdbe6fbc6a2f",
                            "lessThan": "8c3ec88b03e9",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "bdbe6fbc6a2f",
                            "lessThan": "423c6939758f",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "bdbe6fbc6a2f",
                            "lessThan": "1f79bc8ae81c",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "bdbe6fbc6a2f",
                            "lessThan": "06b7cb0194bd",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "bdbe6fbc6a2f",
                            "lessThan": "2038cd15eacd",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "bdbe6fbc6a2f",
                            "lessThan": "5946fbf48355",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "bdbe6fbc6a2f",
                            "lessThan": "b25b60d07616",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "bdbe6fbc6a2f",
                            "lessThan": "49bfcbfd989a",
                            "status": "affected",
                            "versionType": "git"
                        }
                    ]
                },
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "affected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "net/rds/recv.c"
                    ],
                    "versions": [
                        {
                            "version": "2.6.30",
                            "status": "affected"
                        },
                        {
                            "version": "0",
                            "lessThan": "2.6.30",
                            "status": "unaffected",
                            "versionType": "custom"
                        },
                        {
                            "version": "4.4.274",
                            "lessThanOrEqual": "4.4.*",
                            "status": "unaffected",
                            "versionType": "custom"
                        },
                        {
                            "version": "4.9.274",
                            "lessThanOrEqual": "4.9.*",
                            "status": "unaffected",
                            "versionType": "custom"
                        },
                        {
                            "version": "4.14.238",
                            "lessThanOrEqual": "4.14.*",
                            "status": "unaffected",
                            "versionType": "custom"
                        },
                        {
                            "version": "4.19.196",
                            "lessThanOrEqual": "4.19.*",
                            "status": "unaffected",
                            "versionType": "custom"
                        },
                        {
                            "version": "5.4.128",
                            "lessThanOrEqual": "5.4.*",
                            "status": "unaffected",
                            "versionType": "custom"
                        },
                        {
                            "version": "5.10.46",
                            "lessThanOrEqual": "5.10.*",
                            "status": "unaffected",
                            "versionType": "custom"
                        },
                        {
                            "version": "5.12.13",
                            "lessThanOrEqual": "5.12.*",
                            "status": "unaffected",
                            "versionType": "custom"
                        },
                        {
                            "version": "5.13",
                            "lessThanOrEqual": "*",
                            "status": "unaffected",
                            "versionType": "original_commit_for_fix"
                        }
                    ]
                }
            ],
            "references": [
                {
                    "url": "https://git.kernel.org/stable/c/8c3ec88b03e9e4ca117dcdc4204fd3edcd02084f"
                },
                {
                    "url": "https://git.kernel.org/stable/c/423c6939758fb3b9cf5abbd1e7792068a5c4ae8c"
                },
                {
                    "url": "https://git.kernel.org/stable/c/1f79bc8ae81c05eb112a53f981cb2c244ee50d02"
                },
                {
                    "url": "https://git.kernel.org/stable/c/06b7cb0194bd1ede0dd27f3a946e7c0279fba44a"
                },
                {
                    "url": "https://git.kernel.org/stable/c/2038cd15eacdf7512755c27686822e0052eb9042"
                },
                {
                    "url": "https://git.kernel.org/stable/c/5946fbf48355f5a8caeff72580c7658da5966b86"
                },
                {
                    "url": "https://git.kernel.org/stable/c/b25b60d076164edb3025e85aabd2cf50a5215b91"
                },
                {
                    "url": "https://git.kernel.org/stable/c/49bfcbfd989a8f1f23e705759a6bb099de2cff9f"
                }
            ],
            "title": "net: rds: fix memory leak in rds_recvmsg",
            "x_generator": {
                "engine": "bippy-a5840b7849dd"
            }
        },
        "adp": [
            {
                "title": "CISA ADP Vulnrichment",
                "metrics": [
                    {
                        "other": {
                            "type": "ssvc",
                            "content": {
                                "id": "CVE-2021-47249",
                                "role": "CISA Coordinator",
                                "options": [
                                    {
                                        "Exploitation": "none"
                                    },
                                    {
                                        "Automatable": "no"
                                    },
                                    {
                                        "Technical Impact": "partial"
                                    }
                                ],
                                "version": "2.0.3",
                                "timestamp": "2024-05-23T21:22:20.748261Z"
                            }
                        }
                    }
                ],
                "providerMetadata": {
                    "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
                    "shortName": "CISA-ADP",
                    "dateUpdated": "2024-06-04T17:13:47.884Z"
                }
            },
            {
                "providerMetadata": {
                    "orgId": "af854a3a-2127-422b-91ae-364da2661108",
                    "shortName": "CVE",
                    "dateUpdated": "2024-08-04T05:32:07.936Z"
                },
                "title": "CVE Program Container",
                "references": [
                    {
                        "url": "https://git.kernel.org/stable/c/8c3ec88b03e9e4ca117dcdc4204fd3edcd02084f",
                        "tags": [
                            "x_transferred"
                        ]
                    },
                    {
                        "url": "https://git.kernel.org/stable/c/423c6939758fb3b9cf5abbd1e7792068a5c4ae8c",
                        "tags": [
                            "x_transferred"
                        ]
                    },
                    {
                        "url": "https://git.kernel.org/stable/c/1f79bc8ae81c05eb112a53f981cb2c244ee50d02",
                        "tags": [
                            "x_transferred"
                        ]
                    },
                    {
                        "url": "https://git.kernel.org/stable/c/06b7cb0194bd1ede0dd27f3a946e7c0279fba44a",
                        "tags": [
                            "x_transferred"
                        ]
                    },
                    {
                        "url": "https://git.kernel.org/stable/c/2038cd15eacdf7512755c27686822e0052eb9042",
                        "tags": [
                            "x_transferred"
                        ]
                    },
                    {
                        "url": "https://git.kernel.org/stable/c/5946fbf48355f5a8caeff72580c7658da5966b86",
                        "tags": [
                            "x_transferred"
                        ]
                    },
                    {
                        "url": "https://git.kernel.org/stable/c/b25b60d076164edb3025e85aabd2cf50a5215b91",
                        "tags": [
                            "x_transferred"
                        ]
                    },
                    {
                        "url": "https://git.kernel.org/stable/c/49bfcbfd989a8f1f23e705759a6bb099de2cff9f",
                        "tags": [
                            "x_transferred"
                        ]
                    }
                ]
            }
        ]
    }
}