Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
shim-unsigned-x64
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
staging
rpms
shim-unsigned-x64
Commits
1efb0d06
Verified
Commit
1efb0d06
authored
3 years ago
by
Sherif Nagy
Browse files
Options
Downloads
Patches
Plain Diff
Remove duplicate patch 365.patch
parent
1b3d15bf
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
SOURCES/365.patch
+0
-36
0 additions, 36 deletions
SOURCES/365.patch
with
0 additions
and
36 deletions
SOURCES/365.patch
deleted
100644 → 0
+
0
−
36
View file @
1b3d15bf
From 764021ad8e01f5f5122612059ba5d8ab10ff6a3b Mon Sep 17 00:00:00 2001
From: Jonathan Yong <jonathan.yong@intel.com>
Date: Fri, 16 Apr 2021 09:59:03 +0800
Subject: [PATCH] mok: fix potential buffer overrun in import_mok_state
Fix the case where data_size is 0, so config_template is
not implicitly copied like the size calculation above.
upstream-status: https://github.com/rhboot/shim/issues/249
Signed-off-by: Jonathan Yong <jonathan.yong@intel.com>
---
mok.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/mok.c b/mok.c
index beac0ff6..db18093d 100644
--- a/mok.c
+++ b/mok.c
@@ -1034,10 +1034,12 @@
EFI_STATUS import_mok_state(EFI_HANDLE image_handle)
config_template.data_size = v->data_size;
- CopyMem(p, &config_template, sizeof(config_template));
- p += sizeof(config_template);
- CopyMem(p, v->data, v->data_size);
- p += v->data_size;
+ if (v->data && v->data_size) {
+ CopyMem(p, &config_template, sizeof(config_template));
+ p += sizeof(config_template);
+ CopyMem(p, v->data, v->data_size);
+ p += v->data_size;
+ }
}
if (p) {
ZeroMem(&config_template, sizeof(config_template));
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment