Skip to content

Commit b80d60e

Browse files
committed
Merge tag 'parisc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/parisc-2.6
Pull PARISC fixes from James Bottomley: "This is two bug fixes: one fixes a loophole where rt_sigprocmask() with the wrong values panics the box (Denial of Service) and the other fixes an aliasing problem with get_shared_area() which could cause data corruption. Signed-off-by: James Bottomley <JBottomley@Parallels.com>" * tag 'parisc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/parisc-2.6: [PARISC] fix user-triggerable panic on parisc [PARISC] fix virtual aliasing issue in get_shared_area()
2 parents a2d2eda + 441a179 commit b80d60e

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

arch/parisc/kernel/signal32.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,8 @@ put_sigset32(compat_sigset_t __user *up, sigset_t *set, size_t sz)
6565
{
6666
compat_sigset_t s;
6767

68-
if (sz != sizeof *set) panic("put_sigset32()");
68+
if (sz != sizeof *set)
69+
return -EINVAL;
6970
sigset_64to32(&s, set);
7071

7172
return copy_to_user(up, &s, sizeof s);
@@ -77,7 +78,8 @@ get_sigset32(compat_sigset_t __user *up, sigset_t *set, size_t sz)
7778
compat_sigset_t s;
7879
int r;
7980

80-
if (sz != sizeof *set) panic("put_sigset32()");
81+
if (sz != sizeof *set)
82+
return -EINVAL;
8183

8284
if ((r = copy_from_user(&s, up, sz)) == 0) {
8385
sigset_32to64(set, &s);

arch/parisc/kernel/sys_parisc.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,8 @@ static unsigned long get_shared_area(struct address_space *mapping,
7373
struct vm_area_struct *vma;
7474
int offset = mapping ? get_offset(mapping) : 0;
7575

76+
offset = (offset + (pgoff << PAGE_SHIFT)) & 0x3FF000;
77+
7678
addr = DCACHE_ALIGN(addr - offset) + offset;
7779

7880
for (vma = find_vma(current->mm, addr); ; vma = vma->vm_next) {

0 commit comments

Comments
 (0)