mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2025-01-11 17:04:19 +01:00
Fix a security bug. eflags was copied verbatim from userland.
Submitted by: bde
This commit is contained in:
parent
71981dcfc1
commit
89bcf450b0
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=52199
@ -909,7 +909,8 @@ sigreturn(p, uap)
|
||||
vm86->vm86_eflags = eflags; /* save VIF, VIP */
|
||||
eflags = (tf->tf_eflags & ~VM_USERCHANGE) | (eflags & VM_USERCHANGE) | PSL_VM;
|
||||
}
|
||||
bcopy(&ucp->uc_mcontext.mc_fs, regs, sizeof(struct trapframe));
|
||||
bcopy(&ucp->uc_mcontext.mc_fs, tf, sizeof(struct trapframe));
|
||||
tf->tf_eflags = eflags;
|
||||
tf->tf_vm86_ds = tf->tf_ds;
|
||||
tf->tf_vm86_es = tf->tf_es;
|
||||
tf->tf_vm86_fs = tf->tf_fs;
|
||||
|
@ -909,7 +909,8 @@ sigreturn(p, uap)
|
||||
vm86->vm86_eflags = eflags; /* save VIF, VIP */
|
||||
eflags = (tf->tf_eflags & ~VM_USERCHANGE) | (eflags & VM_USERCHANGE) | PSL_VM;
|
||||
}
|
||||
bcopy(&ucp->uc_mcontext.mc_fs, regs, sizeof(struct trapframe));
|
||||
bcopy(&ucp->uc_mcontext.mc_fs, tf, sizeof(struct trapframe));
|
||||
tf->tf_eflags = eflags;
|
||||
tf->tf_vm86_ds = tf->tf_ds;
|
||||
tf->tf_vm86_es = tf->tf_es;
|
||||
tf->tf_vm86_fs = tf->tf_fs;
|
||||
|
Loading…
Reference in New Issue
Block a user