Bug 217920 - [PATCH] ipfilter discard bytes - 3072 instead of 1024
Summary: [PATCH] ipfilter discard bytes - 3072 instead of 1024
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Many People
Assignee: Cy Schubert
URL: https://svnweb.freebsd.org/base?view=...
Keywords: patch
Depends on:
Blocks:
 
Reported: 2017-03-19 15:52 UTC by Codarren Velvindron
Modified: 2017-08-03 14:23 UTC (History)
5 users (show)

See Also:


Attachments
Patch_for_arc4random_discard (608 bytes, patch)
2017-03-19 15:52 UTC, Codarren Velvindron
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Codarren Velvindron 2017-03-19 15:52:47 UTC
Created attachment 180961 [details]
Patch_for_arc4random_discard

As per Cryptographic Requirements published on Wikileaks on March 2017.

We discard more bytes of the first keystream
to reduce the possibility of non-random bytes.

Similar to:
freebsd/freebsd@9395fdf
Comment 1 Codarren Velvindron 2017-03-19 16:39:52 UTC
Similar to patch:
https://svnweb.freebsd.org/base?view=revision&revision=315225
Comment 2 commit-hook freebsd_committer freebsd_triage 2017-07-27 06:26:45 UTC
A commit references this bug:

Author: cy
Date: Thu Jul 27 06:26:16 UTC 2017
New revision: 321605
URL: https://svnweb.freebsd.org/changeset/base/321605

Log:
  As in r315225, discard 3072 bytes of RC4 bytestream instead of 1024.

  PR:		217920
  Submitted by:	codarren@hackers.mu
  Reviewed by:	emaste, cem
  Approved by:	so (implicit, in r315225)
  MFC after:	1 week
  Differential Revision:	D11747
  Patterned after:	r315225

Changes:
  head/contrib/ipfilter/arc4random.c
Comment 3 Cy Schubert freebsd_committer freebsd_triage 2017-07-27 06:27:37 UTC
Committed. Thanks for the patch.
Comment 4 Cy Schubert freebsd_committer freebsd_triage 2017-07-27 06:29:23 UTC
Changed component from kern to bin. IPF arc4random is a userland function.
Comment 5 commit-hook freebsd_committer freebsd_triage 2017-08-03 14:23:02 UTC
A commit references this bug:

Author: cy
Date: Thu Aug  3 14:22:48 UTC 2017
New revision: 322012
URL: https://svnweb.freebsd.org/changeset/base/322012

Log:
  MFC r321605:

  As in r315225, discard 3072 bytes of RC4 bytestream instead of 1024.
  (This implementation of arc4rand(9) is used by the userland ipftest
  utility as it approximates ipfilter kernelspace in userspace.)

  PR:		217920
  Submitted by:	codarren@hackers.mu
  Reviewed by:	emaste, cem
  Approved by:	so (implicit, in r315225)
  Differential Revision:	D11747
  Patterned after:	r315225

Changes:
_U  stable/10/
  stable/10/contrib/ipfilter/arc4random.c
_U  stable/11/
  stable/11/contrib/ipfilter/arc4random.c