<feed xmlns='http://www.w3.org/2005/Atom'>
<title>pm24.git/crypto, branch v4.9-rc7</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<id>https://git.kobert.dev/pm24.git/atom/crypto?h=v4.9-rc7</id>
<link rel='self' href='https://git.kobert.dev/pm24.git/atom/crypto?h=v4.9-rc7'/>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/'/>
<updated>2016-11-25T01:57:48Z</updated>
<entry>
<title>X.509: Fix double free in x509_cert_parse() [ver #3]</title>
<updated>2016-11-25T01:57:48Z</updated>
<author>
<name>Andrey Ryabinin</name>
<email>aryabinin@virtuozzo.com</email>
</author>
<published>2016-11-24T13:23:03Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=2b95fda2c4fcb6d6625963f889247538f247fce0'/>
<id>urn:sha1:2b95fda2c4fcb6d6625963f889247538f247fce0</id>
<content type='text'>
We shouldn't free cert-&gt;pub-&gt;key in x509_cert_parse() because
x509_free_certificate() also does this:
	BUG: Double free or freeing an invalid pointer
	...
	Call Trace:
	 [&lt;ffffffff81896c20&gt;] dump_stack+0x63/0x83
	 [&lt;ffffffff81356571&gt;] kasan_object_err+0x21/0x70
	 [&lt;ffffffff81356ed9&gt;] kasan_report_double_free+0x49/0x60
	 [&lt;ffffffff813561ad&gt;] kasan_slab_free+0x9d/0xc0
	 [&lt;ffffffff81350b7a&gt;] kfree+0x8a/0x1a0
	 [&lt;ffffffff81844fbf&gt;] public_key_free+0x1f/0x30
	 [&lt;ffffffff818455d4&gt;] x509_free_certificate+0x24/0x90
	 [&lt;ffffffff818460bc&gt;] x509_cert_parse+0x2bc/0x300
	 [&lt;ffffffff81846cae&gt;] x509_key_preparse+0x3e/0x330
	 [&lt;ffffffff818444cf&gt;] asymmetric_key_preparse+0x6f/0x100
	 [&lt;ffffffff8178bec0&gt;] key_create_or_update+0x260/0x5f0
	 [&lt;ffffffff8178e6d9&gt;] SyS_add_key+0x199/0x2a0
	 [&lt;ffffffff821d823b&gt;] entry_SYSCALL_64_fastpath+0x1e/0xad
	Object at ffff880110bd1900, in cache kmalloc-512 size: 512
	....
	Freed:
	PID = 2579
	[&lt;ffffffff8104283b&gt;] save_stack_trace+0x1b/0x20
	[&lt;ffffffff813558f6&gt;] save_stack+0x46/0xd0
	[&lt;ffffffff81356183&gt;] kasan_slab_free+0x73/0xc0
	[&lt;ffffffff81350b7a&gt;] kfree+0x8a/0x1a0
	[&lt;ffffffff818460a3&gt;] x509_cert_parse+0x2a3/0x300
	[&lt;ffffffff81846cae&gt;] x509_key_preparse+0x3e/0x330
	[&lt;ffffffff818444cf&gt;] asymmetric_key_preparse+0x6f/0x100
	[&lt;ffffffff8178bec0&gt;] key_create_or_update+0x260/0x5f0
	[&lt;ffffffff8178e6d9&gt;] SyS_add_key+0x199/0x2a0
	[&lt;ffffffff821d823b&gt;] entry_SYSCALL_64_fastpath+0x1e/0xad

Fixes: db6c43bd2132 ("crypto: KEYS: convert public key and digsig asym to the akcipher api")
Signed-off-by: Andrey Ryabinin &lt;aryabinin@virtuozzo.com&gt;
Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
Signed-off-by: James Morris &lt;james.l.morris@oracle.com&gt;
</content>
</entry>
<entry>
<title>crypto: scatterwalk - Remove unnecessary aliasing check in map_and_copy</title>
<updated>2016-11-22T07:02:25Z</updated>
<author>
<name>Herbert Xu</name>
<email>herbert@gondor.apana.org.au</email>
</author>
<published>2016-11-21T08:26:19Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=c8467f7a3620698bf3c22f0e199b550fb611a8ae'/>
<id>urn:sha1:c8467f7a3620698bf3c22f0e199b550fb611a8ae</id>
<content type='text'>
The aliasing check in map_and_copy is no longer necessary because
the IPsec ESP code no longer provides an IV that points into the
actual request data.  As this check is now triggering BUG checks
due to the vmalloced stack code, I'm removing it.

Reported-by: Eric Biggers &lt;ebiggers@google.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: algif_hash - Fix result clobbering in recvmsg</title>
<updated>2016-11-22T07:02:24Z</updated>
<author>
<name>Herbert Xu</name>
<email>herbert@gondor.apana.org.au</email>
</author>
<published>2016-11-21T07:34:00Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=8acf7a106326eb94e143552de81f34308149121c'/>
<id>urn:sha1:8acf7a106326eb94e143552de81f34308149121c</id>
<content type='text'>
Recently an init call was added to hash_recvmsg so as to reset
the hash state in case a sendmsg call was never made.

Unfortunately this ended up clobbering the result if the previous
sendmsg was done with a MSG_MORE flag.  This patch fixes it by
excluding that case when we make the init call.

Fixes: a8348bca2944 ("algif_hash - Fix NULL hash crash with shash")
Reported-by: Patrick Steinhardt &lt;ps@pks.im&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: algif_hash - Fix NULL hash crash with shash</title>
<updated>2016-11-18T14:34:10Z</updated>
<author>
<name>Herbert Xu</name>
<email>herbert@gondor.apana.org.au</email>
</author>
<published>2016-11-17T14:07:58Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=a8348bca2944d397a528772f5c0ccb47a8b58af4'/>
<id>urn:sha1:a8348bca2944d397a528772f5c0ccb47a8b58af4</id>
<content type='text'>
Recently algif_hash has been changed to allow null hashes.  This
triggers a bug when used with an shash algorithm whereby it will
cause a crash during the digest operation.

This patch fixes it by avoiding the digest operation and instead
doing an init followed by a final which avoids the buggy code in
shash.

This patch also ensures that the result buffer is freed after an
error so that it is not returned as a genuine hash result on the
next recv call.

The shash/ahash wrapper code will be fixed later to handle this
case correctly.

Fixes: 493b2ed3f760 ("crypto: algif_hash - Handle NULL hashes correctly")
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
Tested-by: Laura Abbott &lt;labbott@redhat.com&gt;
</content>
</entry>
<entry>
<title>kthread: kthread worker API cleanup</title>
<updated>2016-10-11T22:06:33Z</updated>
<author>
<name>Petr Mladek</name>
<email>pmladek@suse.com</email>
</author>
<published>2016-10-11T20:55:20Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=3989144f863ac576e6efba298d24b0b02a10d4bb'/>
<id>urn:sha1:3989144f863ac576e6efba298d24b0b02a10d4bb</id>
<content type='text'>
A good practice is to prefix the names of functions by the name
of the subsystem.

The kthread worker API is a mix of classic kthreads and workqueues.  Each
worker has a dedicated kthread.  It runs a generic function that process
queued works.  It is implemented as part of the kthread subsystem.

This patch renames the existing kthread worker API to use
the corresponding name from the workqueues API prefixed by
kthread_:

__init_kthread_worker()		-&gt; __kthread_init_worker()
init_kthread_worker()		-&gt; kthread_init_worker()
init_kthread_work()		-&gt; kthread_init_work()
insert_kthread_work()		-&gt; kthread_insert_work()
queue_kthread_work()		-&gt; kthread_queue_work()
flush_kthread_work()		-&gt; kthread_flush_work()
flush_kthread_worker()		-&gt; kthread_flush_worker()

Note that the names of DEFINE_KTHREAD_WORK*() macros stay
as they are. It is common that the "DEFINE_" prefix has
precedence over the subsystem names.

Note that INIT() macros and init() functions use different
naming scheme. There is no good solution. There are several
reasons for this solution:

  + "init" in the function names stands for the verb "initialize"
    aka "initialize worker". While "INIT" in the macro names
    stands for the noun "INITIALIZER" aka "worker initializer".

  + INIT() macros are used only in DEFINE() macros

  + init() functions are used close to the other kthread()
    functions. It looks much better if all the functions
    use the same scheme.

  + There will be also kthread_destroy_worker() that will
    be used close to kthread_cancel_work(). It is related
    to the init() function. Again it looks better if all
    functions use the same naming scheme.

  + there are several precedents for such init() function
    names, e.g. amd_iommu_init_device(), free_area_init_node(),
    jump_label_init_type(),  regmap_init_mmio_clk(),

  + It is not an argument but it was inconsistent even before.

[arnd@arndb.de: fix linux-next merge conflict]
 Link: http://lkml.kernel.org/r/20160908135724.1311726-1-arnd@arndb.de
Link: http://lkml.kernel.org/r/1470754545-17632-3-git-send-email-pmladek@suse.com
Suggested-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Petr Mladek &lt;pmladek@suse.com&gt;
Cc: Oleg Nesterov &lt;oleg@redhat.com&gt;
Cc: Tejun Heo &lt;tj@kernel.org&gt;
Cc: Ingo Molnar &lt;mingo@redhat.com&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Cc: "Paul E. McKenney" &lt;paulmck@linux.vnet.ibm.com&gt;
Cc: Josh Triplett &lt;josh@joshtriplett.org&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Jiri Kosina &lt;jkosina@suse.cz&gt;
Cc: Borislav Petkov &lt;bp@suse.de&gt;
Cc: Michal Hocko &lt;mhocko@suse.cz&gt;
Cc: Vlastimil Babka &lt;vbabka@suse.cz&gt;
Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6</title>
<updated>2016-10-10T21:04:16Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2016-10-10T21:04:16Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=30066ce675d3af350bc5a53858991c0b518dda00'/>
<id>urn:sha1:30066ce675d3af350bc5a53858991c0b518dda00</id>
<content type='text'>
Pull crypto updates from Herbert Xu:
 "Here is the crypto update for 4.9:

  API:
   - The crypto engine code now supports hashes.

  Algorithms:
   - Allow keys &gt;= 2048 bits in FIPS mode for RSA.

  Drivers:
   - Memory overwrite fix for vmx ghash.
   - Add support for building ARM sha1-neon in Thumb2 mode.
   - Reenable ARM ghash-ce code by adding import/export.
   - Reenable img-hash by adding import/export.
   - Add support for multiple cores in omap-aes.
   - Add little-endian support for sha1-powerpc.
   - Add Cavium HWRNG driver for ThunderX SoC"

* 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (137 commits)
  crypto: caam - treat SGT address pointer as u64
  crypto: ccp - Make syslog errors human-readable
  crypto: ccp - clean up data structure
  crypto: vmx - Ensure ghash-generic is enabled
  crypto: testmgr - add guard to dst buffer for ahash_export
  crypto: caam - Unmap region obtained by of_iomap
  crypto: sha1-powerpc - little-endian support
  crypto: gcm - Fix IV buffer size in crypto_gcm_setkey
  crypto: vmx - Fix memory corruption caused by p8_ghash
  crypto: ghash-generic - move common definitions to a new header file
  crypto: caam - fix sg dump
  hwrng: omap - Only fail if pm_runtime_get_sync returns &lt; 0
  crypto: omap-sham - shrink the internal buffer size
  crypto: omap-sham - add support for export/import
  crypto: omap-sham - convert driver logic to use sgs for data xmit
  crypto: omap-sham - change the DMA threshold value to a define
  crypto: omap-sham - add support functions for sg based data handling
  crypto: omap-sham - rename sgl to sgl_tmp for deprecation
  crypto: omap-sham - align algorithms on word offset
  crypto: omap-sham - add context export/import stubs
  ...
</content>
</entry>
<entry>
<title>Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6</title>
<updated>2016-10-10T03:19:47Z</updated>
<author>
<name>Herbert Xu</name>
<email>herbert@gondor.apana.org.au</email>
</author>
<published>2016-10-10T03:19:47Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=c3afafa47898e34eb49828ec4ac92bcdc81c8f0c'/>
<id>urn:sha1:c3afafa47898e34eb49828ec4ac92bcdc81c8f0c</id>
<content type='text'>
Merge the crypto tree to pull in vmx ghash fix.
</content>
</entry>
<entry>
<title>Merge tag 'dmaengine-4.9-rc1' of git://git.infradead.org/users/vkoul/slave-dma</title>
<updated>2016-10-07T00:13:54Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2016-10-07T00:13:54Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=553911c67eb701d46e2dcd073f603c6f6546c38b'/>
<id>urn:sha1:553911c67eb701d46e2dcd073f603c6f6546c38b</id>
<content type='text'>
Pull dmaengine updates from Vinod Koul:
 "This is bit large pile of code which bring in some nice additions:

   - Error reporting: we have added a new mechanism for users of
     dmaenegine to register a callback_result which tells them the
     result of the dma transaction. Right now only one user (ntb) is
     using it.

   - As we discussed on KS mailing list and pointed out NO_IRQ has no
     place in kernel, this also remove NO_IRQ from dmaengine subsystem
     (both arm and ppc users)

   - Support for IOMMU slave transfers and its implementation for arm.

   - To get better build coverage, enable COMPILE_TEST for bunch of
     driver, and fix the warning and sparse complaints on these.

   - Apart from above, usual updates spread across drivers"

* tag 'dmaengine-4.9-rc1' of git://git.infradead.org/users/vkoul/slave-dma: (169 commits)
  async_pq_val: fix DMA memory leak
  dmaengine: virt-dma: move function declarations
  dmaengine: omap-dma: Enable burst and data pack for SG
  DT: dmaengine: rcar-dmac: document R8A7743/5 support
  dmaengine: fsldma: Unmap region obtained by of_iomap
  dmaengine: jz4780: fix resource leaks on error exit return
  dma-debug: fix ia64 build, use PHYS_PFN
  dmaengine: coh901318: fix integer overflow when shifting more than 32 places
  dmaengine: edma: avoid uninitialized variable use
  dma-mapping: fix m32r build warning
  dma-mapping: fix ia64 build, use PHYS_PFN
  dmaengine: ti-dma-crossbar: enable COMPILE_TEST
  dmaengine: omap-dma: enable COMPILE_TEST
  dmaengine: edma: enable COMPILE_TEST
  dmaengine: ti-dma-crossbar: Fix of_device_id data parameter usage
  dmaengine: ti-dma-crossbar: Correct type for of_find_property() third parameter
  dmaengine/ARM: omap-dma: Fix the DMAengine compile test on non OMAP configs
  dmaengine: edma: Rename set_bits and remove unused clear_bits helper
  dmaengine: edma: Use correct type for of_find_property() third parameter
  dmaengine: edma: Fix of_device_id data parameter usage (legacy vs TPCC)
  ...
</content>
</entry>
<entry>
<title>async_pq_val: fix DMA memory leak</title>
<updated>2016-10-05T00:48:09Z</updated>
<author>
<name>Justin Maggard</name>
<email>jmaggard10@gmail.com</email>
</author>
<published>2016-10-04T20:17:58Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=c84750906b4818d4929fbf73a4ae6c113b94f52b'/>
<id>urn:sha1:c84750906b4818d4929fbf73a4ae6c113b94f52b</id>
<content type='text'>
Add missing dmaengine_unmap_put(), so we don't OOM during RAID6 sync.

Fixes: 1786b943dad0 ("async_pq_val: convert to dmaengine_unmap_data")
Signed-off-by: Justin Maggard &lt;jmaggard@netgear.com&gt;
Reviewed-by: Dan Williams &lt;dan.j.williams@intel.com&gt;
Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Vinod Koul &lt;vinod.koul@intel.com&gt;
</content>
</entry>
<entry>
<title>crypto: testmgr - add guard to dst buffer for ahash_export</title>
<updated>2016-10-02T14:33:43Z</updated>
<author>
<name>Jan Stancek</name>
<email>jstancek@redhat.com</email>
</author>
<published>2016-09-28T14:38:37Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=7bcb87bca2f51226f3ec382fcd3ff52cc15747bb'/>
<id>urn:sha1:7bcb87bca2f51226f3ec382fcd3ff52cc15747bb</id>
<content type='text'>
Add a guard to 'state' buffer and warn if its consistency after
call to crypto_ahash_export() changes, so that any write that
goes beyond advertised statesize (and thus causing potential
memory corruption [1]) is more visible.

[1] https://marc.info/?l=linux-crypto-vger&amp;m=147467656516085

Signed-off-by: Jan Stancek &lt;jstancek@redhat.com&gt;
Cc: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
Cc: Marcelo Cerri &lt;marcelo.cerri@canonical.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
</feed>
