In the Linux kernel, the following vulnerability has been resolved:
netfilter: conntrack: fix wrong ct->timeout value
(struct nf_conn)->timeout is an interval before the conntrack confirmed. After confirmed, it becomes a timestamp.
It is observed that timeout of an unconfirmed conntrack:
- Set by calling ctnetlinkchangetimeout(). As a result,
nfct_time_stamp was wrongly added to ct->timeout twice.
- Get by calling ctnetlinkdumptimeout(). As a result,
nfct_time_stamp was wrongly subtracted.
Call Trace: <TASK> dumpstacklvl ctnetlinkdumptimeout _ctnetlinkgluebuild ctnetlinkgluebuild _nfqnlenqueuepacket nfqueue nfhookslow ipmcoutput ? _pfxipfinishoutput ipsendskb ? _pfxdstoutput udpsendskb udpsendmsg ? _pfxipgenericgetfrag socksendmsg
Separate the 2 cases in:
- Setting ct->timeout in _nfctsettimeout().
- Getting ct->timeout in ctnetlinkdumptimeout().
Pablo appends:
Update ctnetlink to set up the timeout after the IPS_CONFIRMED flag is set on, otherwise conntrack creation via ctnetlink breaks.
Note that the problem described in this patch occurs since the introduction of the nfnetlink_queue conntrack support, select a sufficiently old Fixes: tag for -stable kernel to pick up this fix.
{
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/53xxx/CVE-2023-53635.json",
"cna_assigner": "Linux"
}"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2023-53635.json"
[
{
"id": "CVE-2023-53635-025ab874",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@73db1b8f2bb6725b7391e85aab41fdf592b3c0c1",
"target": {
"file": "net/netfilter/nf_conntrack_netlink.c",
"function": "ctnetlink_dump_timeout"
},
"digest": {
"function_hash": "277939547089348100937359961906261277857",
"length": 277.0
},
"signature_version": "v1",
"deprecated": false,
"signature_type": "Function"
},
{
"id": "CVE-2023-53635-0791f0f2",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@ff5e4ac8dd7be7f1faba955c5779a68571eeb0f8",
"target": {
"file": "include/net/netfilter/nf_conntrack_core.h"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"226855776401203361634937029285997249724",
"227579407936046680165768259569119649041",
"14400493576007805705873629621768379279",
"109665851498028990586584556469471576037"
]
},
"signature_version": "v1",
"deprecated": false,
"signature_type": "Line"
},
{
"id": "CVE-2023-53635-2a7859b3",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@73db1b8f2bb6725b7391e85aab41fdf592b3c0c1",
"target": {
"file": "include/net/netfilter/nf_conntrack_core.h"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"226855776401203361634937029285997249724",
"227579407936046680165768259569119649041",
"14400493576007805705873629621768379279",
"109665851498028990586584556469471576037"
]
},
"signature_version": "v1",
"deprecated": false,
"signature_type": "Line"
},
{
"id": "CVE-2023-53635-6b769b41",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@80c5ba0078e20d926d11d0778f9a43902664ebf0",
"target": {
"file": "net/netfilter/nf_conntrack_netlink.c"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"14019883086724896519737438262254594043",
"92286930044375614414605736594960559790",
"50444062331884089850272046488887132016",
"196129744913797159307919142204966983514",
"204874171214254888655594889845053000964",
"252709247435940465736991140485893903553",
"324974597614907746515496285881885276358",
"80892396819302431322473704047604798784",
"153367769082598918830108620144837878941",
"316364855762753722556903067310120169659",
"31009610318108878051948610505833588187",
"85831520068441029081350952647666302006"
]
},
"signature_version": "v1",
"deprecated": false,
"signature_type": "Line"
},
{
"id": "CVE-2023-53635-75acaeb1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@f612ae1ab4793701caf39386fb3b7f4b3ef44e48",
"target": {
"file": "include/net/netfilter/nf_conntrack_core.h"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"226855776401203361634937029285997249724",
"227579407936046680165768259569119649041",
"14400493576007805705873629621768379279",
"109665851498028990586584556469471576037"
]
},
"signature_version": "v1",
"deprecated": false,
"signature_type": "Line"
},
{
"id": "CVE-2023-53635-7aa053ae",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@ff5e4ac8dd7be7f1faba955c5779a68571eeb0f8",
"target": {
"file": "net/netfilter/nf_conntrack_netlink.c"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"14019883086724896519737438262254594043",
"92286930044375614414605736594960559790",
"50444062331884089850272046488887132016",
"196129744913797159307919142204966983514",
"204874171214254888655594889845053000964",
"252709247435940465736991140485893903553",
"324974597614907746515496285881885276358",
"80892396819302431322473704047604798784",
"153367769082598918830108620144837878941",
"316364855762753722556903067310120169659",
"31009610318108878051948610505833588187",
"85831520068441029081350952647666302006"
]
},
"signature_version": "v1",
"deprecated": false,
"signature_type": "Line"
},
{
"id": "CVE-2023-53635-7cbb549e",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@f612ae1ab4793701caf39386fb3b7f4b3ef44e48",
"target": {
"file": "include/net/netfilter/nf_conntrack_core.h",
"function": "__nf_ct_set_timeout"
},
"digest": {
"function_hash": "164951498392994704287571989190926872318",
"length": 171.0
},
"signature_version": "v1",
"deprecated": false,
"signature_type": "Function"
},
{
"id": "CVE-2023-53635-8b7e9dbd",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@f612ae1ab4793701caf39386fb3b7f4b3ef44e48",
"target": {
"file": "net/netfilter/nf_conntrack_netlink.c"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"14019883086724896519737438262254594043",
"92286930044375614414605736594960559790",
"50444062331884089850272046488887132016",
"196129744913797159307919142204966983514",
"204874171214254888655594889845053000964",
"252709247435940465736991140485893903553",
"324974597614907746515496285881885276358",
"80892396819302431322473704047604798784",
"153367769082598918830108620144837878941",
"316364855762753722556903067310120169659",
"31009610318108878051948610505833588187",
"85831520068441029081350952647666302006"
]
},
"signature_version": "v1",
"deprecated": false,
"signature_type": "Line"
},
{
"id": "CVE-2023-53635-9df42e56",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@73db1b8f2bb6725b7391e85aab41fdf592b3c0c1",
"target": {
"file": "net/netfilter/nf_conntrack_netlink.c"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"14019883086724896519737438262254594043",
"92286930044375614414605736594960559790",
"50444062331884089850272046488887132016",
"196129744913797159307919142204966983514",
"204874171214254888655594889845053000964",
"252709247435940465736991140485893903553",
"324974597614907746515496285881885276358",
"80892396819302431322473704047604798784",
"153367769082598918830108620144837878941",
"316364855762753722556903067310120169659",
"31009610318108878051948610505833588187",
"85831520068441029081350952647666302006"
]
},
"signature_version": "v1",
"deprecated": false,
"signature_type": "Line"
},
{
"id": "CVE-2023-53635-ae6dc3a6",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@80c5ba0078e20d926d11d0778f9a43902664ebf0",
"target": {
"file": "include/net/netfilter/nf_conntrack_core.h"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"226855776401203361634937029285997249724",
"227579407936046680165768259569119649041",
"14400493576007805705873629621768379279",
"109665851498028990586584556469471576037"
]
},
"signature_version": "v1",
"deprecated": false,
"signature_type": "Line"
},
{
"id": "CVE-2023-53635-c8ff2ed4",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@80c5ba0078e20d926d11d0778f9a43902664ebf0",
"target": {
"file": "net/netfilter/nf_conntrack_netlink.c",
"function": "ctnetlink_dump_timeout"
},
"digest": {
"function_hash": "277939547089348100937359961906261277857",
"length": 277.0
},
"signature_version": "v1",
"deprecated": false,
"signature_type": "Function"
},
{
"id": "CVE-2023-53635-cd9e380b",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@80c5ba0078e20d926d11d0778f9a43902664ebf0",
"target": {
"file": "include/net/netfilter/nf_conntrack_core.h",
"function": "__nf_ct_set_timeout"
},
"digest": {
"function_hash": "164951498392994704287571989190926872318",
"length": 171.0
},
"signature_version": "v1",
"deprecated": false,
"signature_type": "Function"
},
{
"id": "CVE-2023-53635-e08d9232",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@f612ae1ab4793701caf39386fb3b7f4b3ef44e48",
"target": {
"file": "net/netfilter/nf_conntrack_netlink.c",
"function": "ctnetlink_dump_timeout"
},
"digest": {
"function_hash": "277939547089348100937359961906261277857",
"length": 277.0
},
"signature_version": "v1",
"deprecated": false,
"signature_type": "Function"
},
{
"id": "CVE-2023-53635-e784aec7",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@73db1b8f2bb6725b7391e85aab41fdf592b3c0c1",
"target": {
"file": "include/net/netfilter/nf_conntrack_core.h",
"function": "__nf_ct_set_timeout"
},
"digest": {
"function_hash": "164951498392994704287571989190926872318",
"length": 171.0
},
"signature_version": "v1",
"deprecated": false,
"signature_type": "Function"
},
{
"id": "CVE-2023-53635-e85ac922",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@ff5e4ac8dd7be7f1faba955c5779a68571eeb0f8",
"target": {
"file": "include/net/netfilter/nf_conntrack_core.h",
"function": "__nf_ct_set_timeout"
},
"digest": {
"function_hash": "164951498392994704287571989190926872318",
"length": 171.0
},
"signature_version": "v1",
"deprecated": false,
"signature_type": "Function"
},
{
"id": "CVE-2023-53635-feb924e2",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@ff5e4ac8dd7be7f1faba955c5779a68571eeb0f8",
"target": {
"file": "net/netfilter/nf_conntrack_netlink.c",
"function": "ctnetlink_dump_timeout"
},
"digest": {
"function_hash": "277939547089348100937359961906261277857",
"length": 277.0
},
"signature_version": "v1",
"deprecated": false,
"signature_type": "Function"
}
]