All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/mupdf: fix CVE-2021-4216
@ 2022-11-06 13:38 Fabrice Fontaine
  2022-11-06 14:07 ` Yann E. MORIN
  2022-11-14 22:26 ` Peter Korsgaard
  0 siblings, 2 replies; 3+ messages in thread
From: Fabrice Fontaine @ 2022-11-06 13:38 UTC (permalink / raw)
  To: buildroot; +Cc: Raphaël Mélotte, Fabrice Fontaine

A Floating point exception (division-by-zero) flaw was found in Mupdf
for zero width pages in muraster.c. It is fixed in Mupdf-1.20.0-rc1
upstream.

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 ...ero-for-zero-width-pages-in-muraster.patch | 29 +++++++++++++++++++
 package/mupdf/mupdf.mk                        |  3 ++
 2 files changed, 32 insertions(+)
 create mode 100644 package/mupdf/0005-Bug-704834-Fix-division-by-zero-for-zero-width-pages-in-muraster.patch

diff --git a/package/mupdf/0005-Bug-704834-Fix-division-by-zero-for-zero-width-pages-in-muraster.patch b/package/mupdf/0005-Bug-704834-Fix-division-by-zero-for-zero-width-pages-in-muraster.patch
new file mode 100644
index 0000000000..099a3fdbab
--- /dev/null
+++ b/package/mupdf/0005-Bug-704834-Fix-division-by-zero-for-zero-width-pages-in-muraster.patch
@@ -0,0 +1,29 @@
+From 22c47acbd52949421f8c7cb46ea1556827d0fcbf Mon Sep 17 00:00:00 2001
+From: Sebastian Rasmussen <sebras@gmail.com>
+Date: Tue, 18 Jan 2022 20:33:10 +0100
+Subject: [PATCH] Bug 704834: Fix division by zero for zero width pages in
+ muraster.
+
+[Retrieved from:
+https://github.com/ArtifexSoftware/mupdf/commit/22c47acbd52949421f8c7cb46ea1556827d0fcbf]
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+---
+ source/tools/muraster.c | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/source/tools/muraster.c b/source/tools/muraster.c
+index c2ceb62f2e..97f4ae2633 100644
+--- a/source/tools/muraster.c
++++ b/source/tools/muraster.c
+@@ -1003,8 +1003,9 @@ initialise_banding(fz_context *ctx, render_details *render, int color)
+ 
+ 	w = render->ibounds.x1 - render->ibounds.x0;
+ 	min_band_mem = (size_t)bpp * w * min_band_height;
+-	reps = (int)(max_band_memory / min_band_mem);
+-	if (reps < 1)
++	if (min_band_mem > 0)
++		reps = (int)(max_band_memory / min_band_mem);
++	if (min_band_mem == 0 || reps < 1)
+ 		reps = 1;
+ 
+ 	/* Adjust reps to even out the work between threads */
diff --git a/package/mupdf/mupdf.mk b/package/mupdf/mupdf.mk
index 56ea7cc507..e86ba1e73f 100644
--- a/package/mupdf/mupdf.mk
+++ b/package/mupdf/mupdf.mk
@@ -28,6 +28,9 @@ MUPDF_IGNORE_CVES += CVE-2021-3407
 # 0003-Bug-703791-Stay-within-hash-table-max-key-size-in-cached-color-converter.patch
 MUPDF_IGNORE_CVES += CVE-2021-37220
 
+# 0005-Bug-704834-Fix-division-by-zero-for-zero-width-pages-in-muraster.patch
+MUPDF_IGNORE_CVES += CVE-2021-4216
+
 # The pkg-config name for gumbo-parser is `gumbo`.
 MUPDF_PKG_CONFIG_PACKAGES = \
 	freetype2 \
-- 
2.35.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Buildroot] [PATCH 1/1] package/mupdf: fix CVE-2021-4216
  2022-11-06 13:38 [Buildroot] [PATCH 1/1] package/mupdf: fix CVE-2021-4216 Fabrice Fontaine
@ 2022-11-06 14:07 ` Yann E. MORIN
  2022-11-14 22:26 ` Peter Korsgaard
  1 sibling, 0 replies; 3+ messages in thread
From: Yann E. MORIN @ 2022-11-06 14:07 UTC (permalink / raw)
  To: Fabrice Fontaine; +Cc: Raphaël Mélotte, buildroot

Fabrice, All,

On 2022-11-06 14:38 +0100, Fabrice Fontaine spake thusly:
> A Floating point exception (division-by-zero) flaw was found in Mupdf
> for zero width pages in muraster.c. It is fixed in Mupdf-1.20.0-rc1
> upstream.
> 
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>

Applied to master, thanks.

Regards,
Yann E. MORIN.

> ---
>  ...ero-for-zero-width-pages-in-muraster.patch | 29 +++++++++++++++++++
>  package/mupdf/mupdf.mk                        |  3 ++
>  2 files changed, 32 insertions(+)
>  create mode 100644 package/mupdf/0005-Bug-704834-Fix-division-by-zero-for-zero-width-pages-in-muraster.patch
> 
> diff --git a/package/mupdf/0005-Bug-704834-Fix-division-by-zero-for-zero-width-pages-in-muraster.patch b/package/mupdf/0005-Bug-704834-Fix-division-by-zero-for-zero-width-pages-in-muraster.patch
> new file mode 100644
> index 0000000000..099a3fdbab
> --- /dev/null
> +++ b/package/mupdf/0005-Bug-704834-Fix-division-by-zero-for-zero-width-pages-in-muraster.patch
> @@ -0,0 +1,29 @@
> +From 22c47acbd52949421f8c7cb46ea1556827d0fcbf Mon Sep 17 00:00:00 2001
> +From: Sebastian Rasmussen <sebras@gmail.com>
> +Date: Tue, 18 Jan 2022 20:33:10 +0100
> +Subject: [PATCH] Bug 704834: Fix division by zero for zero width pages in
> + muraster.
> +
> +[Retrieved from:
> +https://github.com/ArtifexSoftware/mupdf/commit/22c47acbd52949421f8c7cb46ea1556827d0fcbf]
> +Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> +---
> + source/tools/muraster.c | 5 +++--
> + 1 file changed, 3 insertions(+), 2 deletions(-)
> +
> +diff --git a/source/tools/muraster.c b/source/tools/muraster.c
> +index c2ceb62f2e..97f4ae2633 100644
> +--- a/source/tools/muraster.c
> ++++ b/source/tools/muraster.c
> +@@ -1003,8 +1003,9 @@ initialise_banding(fz_context *ctx, render_details *render, int color)
> + 
> + 	w = render->ibounds.x1 - render->ibounds.x0;
> + 	min_band_mem = (size_t)bpp * w * min_band_height;
> +-	reps = (int)(max_band_memory / min_band_mem);
> +-	if (reps < 1)
> ++	if (min_band_mem > 0)
> ++		reps = (int)(max_band_memory / min_band_mem);
> ++	if (min_band_mem == 0 || reps < 1)
> + 		reps = 1;
> + 
> + 	/* Adjust reps to even out the work between threads */
> diff --git a/package/mupdf/mupdf.mk b/package/mupdf/mupdf.mk
> index 56ea7cc507..e86ba1e73f 100644
> --- a/package/mupdf/mupdf.mk
> +++ b/package/mupdf/mupdf.mk
> @@ -28,6 +28,9 @@ MUPDF_IGNORE_CVES += CVE-2021-3407
>  # 0003-Bug-703791-Stay-within-hash-table-max-key-size-in-cached-color-converter.patch
>  MUPDF_IGNORE_CVES += CVE-2021-37220
>  
> +# 0005-Bug-704834-Fix-division-by-zero-for-zero-width-pages-in-muraster.patch
> +MUPDF_IGNORE_CVES += CVE-2021-4216
> +
>  # The pkg-config name for gumbo-parser is `gumbo`.
>  MUPDF_PKG_CONFIG_PACKAGES = \
>  	freetype2 \
> -- 
> 2.35.1
> 
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Buildroot] [PATCH 1/1] package/mupdf: fix CVE-2021-4216
  2022-11-06 13:38 [Buildroot] [PATCH 1/1] package/mupdf: fix CVE-2021-4216 Fabrice Fontaine
  2022-11-06 14:07 ` Yann E. MORIN
@ 2022-11-14 22:26 ` Peter Korsgaard
  1 sibling, 0 replies; 3+ messages in thread
From: Peter Korsgaard @ 2022-11-14 22:26 UTC (permalink / raw)
  To: Fabrice Fontaine; +Cc: Raphaël Mélotte, buildroot

>>>>> "Fabrice" == Fabrice Fontaine <fontaine.fabrice@gmail.com> writes:

 > A Floating point exception (division-by-zero) flaw was found in Mupdf
 > for zero width pages in muraster.c. It is fixed in Mupdf-1.20.0-rc1
 > upstream.

 > Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>

Committed to 2022.08.x and 2022.02.x, thanks.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-11-14 22:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-06 13:38 [Buildroot] [PATCH 1/1] package/mupdf: fix CVE-2021-4216 Fabrice Fontaine
2022-11-06 14:07 ` Yann E. MORIN
2022-11-14 22:26 ` Peter Korsgaard

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.