Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
cs24-21fa
project05b
Commits
71a1e028
Commit
71a1e028
authored
4 years ago
by
Adam Blank
Browse files
Options
Download
Email Patches
Plain Diff
Update exploit.c
parent
e48f19dc
master
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/exploit.c
+15
-0
src/exploit.c
with
15 additions
and
0 deletions
+15
-0
src/exploit.c
View file @
71a1e028
...
@@ -11,6 +11,21 @@
...
@@ -11,6 +11,21 @@
#include "util.h"
#include "util.h"
static
inline
void
*
get_kernel_data_address
()
{
FILE
*
address_file
;
address_file
=
fopen
(
"/sys/kernel/kernel_data/address"
,
"r"
);
if
(
address_file
!=
NULL
)
{
uint64_t
address
;
if
(
fscanf
(
address_file
,
"%lx
\n
"
,
&
address
)
==
1
)
{
fclose
(
address_file
);
return
(
void
*
)
address
;
}
fclose
(
address_file
);
}
return
0
;
}
// TODO: Copy your code from the previous stage and make the necessary edits to do_access()
// TODO: Copy your code from the previous stage and make the necessary edits to do_access()
// Note that this code WILL NOT WORK on compute-cpu2. You must push it to gitlab to get it to run
// Note that this code WILL NOT WORK on compute-cpu2. You must push it to gitlab to get it to run
// on one of the meltdown machines.
// on one of the meltdown machines.
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help