func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
routerlist_insert_old(routerlist_t *rl, routerinfo_t *ri)
{
{
/* XXXX remove this code if it slows us down. */
routerinfo_t *ri_generated = router_get_my_routerinfo();
tor_assert(ri_generated != ri);
}
tor_assert(ri->cache_info.routerlist_index == -1);
if (should_cache_old_descriptors() &&
ri... | 0 | [
"CWE-399"
] | tor | 308f6dad20675c42b29862f4269ad1fbfb00dc9a | 38,252,064,961,915,465,000,000,000,000,000,000,000 | 26 | Mitigate a side-channel leak of which relays Tor chooses for a circuit
Tor's and OpenSSL's current design guarantee that there are other leaks,
but this one is likely to be more easily exploitable, and is easy to fix. |
static void irda_connect_confirm(void *instance, void *sap,
struct qos_info *qos,
__u32 max_sdu_size, __u8 max_header_size,
struct sk_buff *skb)
{
struct irda_sock *self;
struct sock *sk;
self = instance;
pr_debug("%s(%p)\n", __func__, self);
sk = instance;
if (sk == NULL) {
dev_kfree_skb(skb)... | 0 | [] | net | 79462ad02e861803b3840cc782248c7359451cd9 | 30,193,918,944,917,280,000,000,000,000,000,000,000 | 58 | net: add validation for the socket syscall protocol argument
郭永刚 reported that one could simply crash the kernel as root by
using a simple program:
int socket_fd;
struct sockaddr_in addr;
addr.sin_port = 0;
addr.sin_addr.s_addr = INADDR_ANY;
addr.sin_family = 10;
socket_fd = socket(10,3,0x40000000);
connect(s... |
void Scanner::try_lex_string_in_code(char quote)
{
// We need to lex string literals in code blocks because they may contain closing
// brace symbol that would otherwise be erroneously lexed as a real closing brace.
//
// However, single quote in Rust may be either the beginning of a char literal as in
... | 1 | [
"CWE-787"
] | re2c | 039c18949190c5de5397eba504d2c75dad2ea9ca | 327,776,780,290,780,700,000,000,000,000,000,000,000 | 199 | Emit an error when repetition lower bound exceeds upper bound.
Historically this was allowed and re2c swapped the bounds. However, it
most likely indicates an error in user code and there is only a single
occurrence in the tests (and the test in an artificial one), so although
the change is backwards incompatible ther... |
rsvg_new_text (void)
{
RsvgNodeText *text;
text = g_new (RsvgNodeText, 1);
_rsvg_node_init (&text->super, RSVG_NODE_TYPE_TEXT);
text->super.draw = _rsvg_node_text_draw;
text->super.set_atts = _rsvg_node_text_set_atts;
text->x = text->y = text->dx = text->dy = _rsvg_css_parse_length ("0");
re... | 0 | [] | librsvg | 34c95743ca692ea0e44778e41a7c0a129363de84 | 314,835,663,861,775,260,000,000,000,000,000,000,000 | 10 | Store node type separately in RsvgNode
The node name (formerly RsvgNode:type) cannot be used to infer
the sub-type of RsvgNode that we're dealing with, since for unknown
elements we put type = node-name. This lead to a (potentially exploitable)
crash e.g. when the element name started with "fe" which tricked
the old c... |
compileTranslationTable (const char *tableList)
{
/*compile source tables into a table in memory */
int k;
char mainTable[MAXSTRING];
char subTable[MAXSTRING];
int listLength;
int currentListPos = 0;
errorCount = 0;
warningCount = 0;
fileCount = 0;
table = NULL;
characterClasses = NULL;
ruleNames ... | 1 | [] | liblouis | dc97ef791a4fae9da11592c79f9f79e010596e0c | 13,278,298,906,072,000,000,000,000,000,000,000,000 | 93 | Merge branch 'table_resolver' |
static void TIFFUnmapBlob(thandle_t image,tdata_t base,toff_t size)
{
(void) image;
(void) base;
(void) size;
} | 0 | [
"CWE-125"
] | ImageMagick | 803bc34ebe023f209f745baf8a112610ff77cc8c | 43,348,304,741,100,760,000,000,000,000,000,000,000 | 6 | Prevent possible buffer overflow when reading TIFF images (bug report from Shi Pu of MS509 Team) |
void JBIG2Stream::discardSegment(unsigned int segNum)
{
for (auto it = globalSegments.begin(); it != globalSegments.end(); ++it) {
if ((*it)->getSegNum() == segNum) {
globalSegments.erase(it);
return;
}
}
for (auto it = segments.begin(); it != segments.end(); ++it) {
... | 0 | [
"CWE-476",
"CWE-190"
] | poppler | 27354e9d9696ee2bc063910a6c9a6b27c5184a52 | 6,294,741,209,778,948,000,000,000,000,000,000,000 | 15 | JBIG2Stream: Fix crash on broken file
https://github.com/jeffssh/CVE-2021-30860
Thanks to David Warren for the heads up |
static ssize_t usbip_sockfd_store(struct device *dev, struct device_attribute *attr,
const char *buf, size_t count)
{
struct stub_device *sdev = dev_get_drvdata(dev);
int sockfd = 0;
struct socket *socket;
int rv;
struct task_struct *tcp_rx = NULL;
struct task_struct *tcp_tx = NULL;
if (!sdev) {
dev_er... | 0 | [
"CWE-362"
] | linux | 9380afd6df70e24eacbdbde33afc6a3950965d22 | 151,624,572,692,064,030,000,000,000,000,000,000,000 | 93 | usbip: fix stub_dev usbip_sockfd_store() races leading to gpf
usbip_sockfd_store() is invoked when user requests attach (import)
detach (unimport) usb device from usbip host. vhci_hcd sends import
request and usbip_sockfd_store() exports the device if it is free
for export.
Export and unexport are governed by local s... |
static int unlink_queued(struct usbtest_dev *dev, int pipe, unsigned num,
unsigned size)
{
struct queued_ctx ctx;
struct usb_device *udev = testdev_to_usbdev(dev);
void *buf;
dma_addr_t buf_dma;
int i;
int retval = -ENOMEM;
init_completion(&ctx.complete);
atomic_set(&ctx.pending, 1); /* One more than ... | 0 | [
"CWE-476"
] | linux | 7c80f9e4a588f1925b07134bb2e3689335f6c6d8 | 41,004,979,396,866,767,000,000,000,000,000,000,000 | 72 | usb: usbtest: fix NULL pointer dereference
If the usbtest driver encounters a device with an IN bulk endpoint but
no OUT bulk endpoint, it will try to dereference a NULL pointer
(out->desc.bEndpointAddress). The problem can be solved by adding a
missing test.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Rep... |
void passing_segment(Vertex_handle v, IT)
{ v->mark() = true; } | 0 | [
"CWE-269"
] | cgal | 618b409b0fbcef7cb536a4134ae3a424ef5aae45 | 240,131,562,589,061,700,000,000,000,000,000,000,000 | 2 | Fix Nef_2 and Nef_S2 IO |
static double mp_vector_off(_cimg_math_parser& mp) {
const unsigned int
ptr = (unsigned int)mp.opcode[2] + 1,
siz = (unsigned int)mp.opcode[3];
const int off = (int)_mp_arg(4);
return off>=0 && off<(int)siz?mp.mem[ptr + off]:cimg::type<double>::nan(); | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 323,266,361,065,079,200,000,000,000,000,000,000,000 | 7 | Fix other issues in 'CImg<T>::load_bmp()'. |
static int _get_lderrno(LDAP *ldap)
{
#if !HAVE_NSLDAP
#if LDAP_API_VERSION > 2000 || HAVE_ORALDAP
int lderr;
/* New versions of OpenLDAP do it this way */
ldap_get_option(ldap, LDAP_OPT_ERROR_NUMBER, &lderr);
return lderr;
#else
return ldap->ld_errno;
#endif
#else
return ldap_get_lderrno(ldap, NULL, NULL);
#end... | 0 | [
"CWE-476"
] | php-src | 49782c54994ecca2ef2a061063bd5a7079c43527 | 142,340,944,000,994,430,000,000,000,000,000,000,000 | 16 | Fix bug #76248 - Malicious LDAP-Server Response causes Crash |
*/
PHP_FUNCTION(date_timezone_set)
{
zval *object;
zval *timezone_object;
php_date_obj *dateobj;
php_timezone_obj *tzobj;
if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "OO", &object, date_ce_date, &timezone_object, date_ce_timezone) == FAILURE) {
RETURN_FALSE... | 0 | [] | php-src | 7b1898183032eeabc64a086ff040af991cebcd93 | 194,919,221,813,484,200,000,000,000,000,000,000,000 | 29 | Fix bug #68942 (Use after free vulnerability in unserialize() with DateTimeZone)
Conflicts:
ext/date/php_date.c |
int digest_file_window(struct digest *d, const char *filename,
unsigned char *hash,
const unsigned char *sig,
loff_t start, loff_t size)
{
int fd, ret;
ret = digest_init(d);
if (ret)
return ret;
fd = open(filename, O_RDONLY);
if (fd < 0) {
perror(filename);
return -errno;
}
re... | 0 | [
"CWE-200"
] | barebox | 0a9f9a7410681e55362f8311537ebc7be9ad0fbe | 231,828,478,775,561,150,000,000,000,000,000,000,000 | 30 | crypto: digest: use crypto_memneq()
When verifying a digest it is important not to leak timing information
through memcmp(). Use crypto_memneq() instead.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> |
static void load_creator_from_old_format(
FILE *fp,
xref_t *xref,
const char *buf,
size_t buf_size)
{
int i, n_eles, length, is_escaped, obj_id;
char *c, *ascii, *start, *s, *saved_buf_search, *obj;
size_t obj_size;
pdf_creator_t *info;
inf... | 0 | [
"CWE-787"
] | pdfresurrect | 1b422459f07353adce2878806d5247d9e91fb397 | 140,589,812,648,370,320,000,000,000,000,000,000,000 | 125 | Update header validation checks.
Thanks to yifengchen-cc for identifying this. |
int run_plugin_auth(MYSQL *mysql, char *data, uint data_len,
const char *data_plugin, const char *db)
{
const char *auth_plugin_name;
auth_plugin_t *auth_plugin;
MCPVIO_EXT mpvio;
ulong pkt_length;
int res;
DBUG_ENTER ("run_plugin_auth");
/* determine the default/init... | 0 | [
"CWE-254"
] | server | f0d774d48416bb06063184380b684380ca005a41 | 252,665,685,865,972,950,000,000,000,000,000,000,000 | 155 | MDEV-9212 ssl-validate-cert incorrect hostname check
Reimplement ssl_verify_server_cert() using the logic
from https://wiki.openssl.org/index.php/Hostname_validation
The bug was discovered by Alex Gaynor. |
static unsigned pirq_from_irq(unsigned irq)
{
struct irq_info *info = info_for_irq(irq);
BUG_ON(info == NULL);
BUG_ON(info->type != IRQT_PIRQ);
return info->u.pirq.pirq;
} | 0 | [
"CWE-400",
"CWE-703"
] | linux | e99502f76271d6bc4e374fe368c50c67a1fd3070 | 133,450,379,776,999,430,000,000,000,000,000,000,000 | 9 | xen/events: defer eoi in case of excessive number of events
In case rogue guests are sending events at high frequency it might
happen that xen_evtchn_do_upcall() won't stop processing events in
dom0. As this is done in irq handling a crash might be the result.
In order to avoid that, delay further inter-domain events... |
int tcp_sendpage(struct sock *sk, struct page *page, int offset,
size_t size, int flags)
{
int ret;
lock_sock(sk);
ret = tcp_sendpage_locked(sk, page, offset, size, flags);
release_sock(sk);
return ret;
} | 0 | [
"CWE-190"
] | net | 3b4929f65b0d8249f19a50245cd88ed1a2f78cff | 220,053,079,984,018,570,000,000,000,000,000,000,000 | 11 | tcp: limit payload size of sacked skbs
Jonathan Looney reported that TCP can trigger the following crash
in tcp_shifted_skb() :
BUG_ON(tcp_skb_pcount(skb) < pcount);
This can happen if the remote peer has advertized the smallest
MSS that linux TCP accepts : 48
An skb can hold 17 fragments, and each fragment can ho... |
static void raw_dispatch(const MessagesMap_t *entry, const uint8_t *msg, uint32_t msg_size,
uint32_t frame_length)
{
static RawMessage raw_msg;
raw_msg.buffer = msg;
raw_msg.length = msg_size;
if(entry->process_func)
{
((raw_msg_handler_t)entry->process_func)(&raw_m... | 0 | [
"CWE-787"
] | keepkey-firmware | b222c66cdd7c3203d917c80ba615082d309d80c3 | 166,692,923,894,419,290,000,000,000,000,000,000,000 | 12 | board: factor out tiny_dispatch
And add stronger checks on what tiny_msg's are allowed to be decoded. |
static CodecStats& atomicGet(AtomicPtr& ptr, Stats::Scope& scope) {
return *ptr.get([&scope]() -> CodecStats* {
return new CodecStats{ALL_HTTP2_CODEC_STATS(POOL_COUNTER_PREFIX(scope, "http2."),
POOL_GAUGE_PREFIX(scope, "http2."))};
});
} | 0 | [
"CWE-400"
] | envoy | 0e49a495826ea9e29134c1bd54fdeb31a034f40c | 129,236,794,956,903,830,000,000,000,000,000,000,000 | 6 | http/2: add stats and stream flush timeout (#139)
This commit adds a new stream flush timeout to guard against a
remote server that does not open window once an entire stream has
been buffered for flushing. Additional stats have also been added
to better understand the codecs view of active streams as well as
amount o... |
static unsigned char *PopRunlengthPacket(Image *image,unsigned char *pixels,
size_t length,PixelPacket pixel,IndexPacket index)
{
if (image->storage_class != DirectClass)
{
unsigned int
value;
value=(unsigned int) index;
switch (image->depth)
{
case 32:
{
... | 0 | [
"CWE-772"
] | ImageMagick6 | ae3eecad2f59e27123c1a6c891be75d06fc03656 | 223,392,069,594,394,550,000,000,000,000,000,000,000 | 159 | https://github.com/ImageMagick/ImageMagick/issues/1191 |
ssize_t get_exactly(const size_t want, ceph::bufferlist& dst) override {
return get_decoratee().get_exactly(want, dst);
} | 0 | [
"CWE-770"
] | ceph | ab29bed2fc9f961fe895de1086a8208e21ddaddc | 325,171,028,766,702,420,000,000,000,000,000,000,000 | 3 | rgw: fix issues with 'enforce bounds' patch
The patch to enforce bounds on max-keys/max-uploads/max-parts had a few
issues that would prevent us from compiling it. Instead of changing the
code provided by the submitter, we're addressing them in a separate
commit to maintain the DCO.
Signed-off-by: Joao Eduardo Luis <... |
static ssize_t size_show(struct device *dev,
struct device_attribute *attr, char *buf)
{
struct cacheinfo *this_leaf = dev_get_drvdata(dev);
return sysfs_emit(buf, "%uK\n", this_leaf->size >> 10);
} | 0 | [
"CWE-787"
] | linux | aa838896d87af561a33ecefea1caa4c15a68bc47 | 167,130,415,390,190,100,000,000,000,000,000,000,000 | 7 | drivers core: Use sysfs_emit and sysfs_emit_at for show(device *...) functions
Convert the various sprintf fmaily calls in sysfs device show functions
to sysfs_emit and sysfs_emit_at for PAGE_SIZE buffer safety.
Done with:
$ spatch -sp-file sysfs_emit_dev.cocci --in-place --max-width=80 .
And cocci script:
$ cat s... |
static gboolean input_device_auto_reconnect(gpointer user_data)
{
struct input_device *idev = user_data;
DBG("path=%s, attempt=%d", idev->path, idev->reconnect_attempt);
/* Stop the recurrent reconnection attempts if the device is
* reconnected or is marked for removal.
*/
if (device_is_temporary(idev->device... | 0 | [] | bluez | 3cccdbab2324086588df4ccf5f892fb3ce1f1787 | 332,313,456,995,848,660,000,000,000,000,000,000,000 | 33 | HID accepts bonded device connections only.
This change adds a configuration for platforms to choose a more secure
posture for the HID profile. While some older mice are known to not
support pairing or encryption, some platform may choose a more secure
posture by requiring the device to be bonded and require the
con... |
iter_state_to_string(enum iter_state state)
{
switch (state)
{
case INIT_REQUEST_STATE :
return "INIT REQUEST STATE";
case INIT_REQUEST_2_STATE :
return "INIT REQUEST STATE (stage 2)";
case INIT_REQUEST_3_STATE:
return "INIT REQUEST STATE (stage 3)";
case QUERYTARGETS_STATE :
return "QUERY TARGETS STATE";... | 0 | [
"CWE-400"
] | unbound | ba0f382eee814e56900a535778d13206b86b6d49 | 115,658,364,174,873,300,000,000,000,000,000,000,000 | 26 | - CVE-2020-12662 Unbound can be tricked into amplifying an incoming
query into a large number of queries directed to a target.
- CVE-2020-12663 Malformed answers from upstream name servers can be
used to make Unbound unresponsive. |
SparseFeatureReader(const Tensor& indices_t, const Tensor& values_t,
int64 batch_size)
: values_(values_t.flat<ValuesType>()) {
row_splits_.reserve(batch_size + 1);
row_splits_.push_back(0);
auto indices = indices_t.matrix<int64>();
int64 num_values = values_.size();
in... | 0 | [
"CWE-125",
"CWE-369"
] | tensorflow | 44b7f486c0143f68b56c34e2d01e146ee445134a | 336,799,617,101,973,470,000,000,000,000,000,000,000 | 13 | Fix out of bounds read in `ragged_cross_op.cc`.
PiperOrigin-RevId: 369757702
Change-Id: Ie6e5d2c21513a8d56bf41fcf35960caf76e890f9 |
static void check_image(size_t pageno, QPDFObjectHandle page)
{
QPDFObjectHandle image =
page.getKey("/Resources").getKey("/XObject").getKey("/Im1");
ImageChecker ic(pageno);
image.pipeStreamData(&ic, 0, qpdf_dl_specialized);
} | 0 | [
"CWE-787"
] | qpdf | d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e | 65,934,335,381,530,130,000,000,000,000,000,000,000 | 7 | Fix sign and conversion warnings (major)
This makes all integer type conversions that have potential data loss
explicit with calls that do range checks and raise an exception. After
this commit, qpdf builds with no warnings when -Wsign-conversion
-Wconversion is used with gcc or clang or when -W3 -Wd4800 is used
with ... |
mesh_state_delete(struct module_qstate* qstate)
{
struct mesh_area* mesh;
struct mesh_state_ref* super, ref;
struct mesh_state* mstate;
if(!qstate)
return;
mstate = qstate->mesh_info;
mesh = mstate->s.env->mesh;
mesh_detach_subs(&mstate->s);
if(mstate->list_select == mesh_forever_list) {
mesh->num_forever_s... | 0 | [
"CWE-613",
"CWE-703"
] | unbound | f6753a0f1018133df552347a199e0362fc1dac68 | 305,270,626,307,401,540,000,000,000,000,000,000,000 | 36 | - Fix the novel ghost domain issues CVE-2022-30698 and CVE-2022-30699. |
void Magick::Image::whiteThresholdChannel(const ChannelType channel_,
const std::string &threshold_)
{
modifyImage();
GetPPException;
GetAndSetPPChannelMask(channel_);
WhiteThresholdImage(image(),threshold_.c_str(),exceptionInfo);
RestorePPChannelMask;
ThrowImageException;
} | 0 | [
"CWE-416"
] | ImageMagick | 8c35502217c1879cb8257c617007282eee3fe1cc | 156,914,411,168,928,370,000,000,000,000,000,000,000 | 10 | Added missing return to avoid use after free. |
char * exif_dump_data(int *dump_free, int format, int components, int length, int motorola_intel, char *value_ptr) /* {{{ */
{
char *dump;
int len;
*dump_free = 0;
if (format == TAG_FMT_STRING) {
return value_ptr ? value_ptr : "<no data>";
}
if (format == TAG_FMT_UNDEFINED) {
return "<undefined>\n";
}
if (... | 0 | [
"CWE-125"
] | php-src | 887a7b571407f7a49a5e7cf1e612d21ef83fedb4 | 226,139,405,103,187,420,000,000,000,000,000,000,000 | 70 | Fixed bug #77831 - Heap-buffer-overflow in exif_iif_add_value in EXIF |
static int neightbl_fill_param_info(struct neigh_table *tbl,
struct neigh_parms *parms,
struct sk_buff *skb,
struct netlink_callback *cb)
{
struct ndtmsg *ndtmsg;
struct nlmsghdr *nlh;
nlh = NLMSG_NEW_ANSWER(skb, cb, RTM_NEWNEIGHTBL, sizeof(struct ndtmsg),
NLM_F_MULTI);
ndtmsg = ... | 1 | [
"CWE-200"
] | linux-2.6 | 9ef1d4c7c7aca1cd436612b6ca785b726ffb8ed8 | 165,521,843,735,665,700,000,000,000,000,000,000,000 | 30 | [NETLINK]: Missing initializations in dumped data
Mostly missing initialization of padding fields of 1 or 2 bytes length,
two instances of uninitialized nlmsgerr->msg of 16 bytes length.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net> |
static int __f2fs_set_acl(struct inode *inode, int type,
struct posix_acl *acl, struct page *ipage)
{
int name_index;
void *value = NULL;
size_t size = 0;
int error;
switch (type) {
case ACL_TYPE_ACCESS:
name_index = F2FS_XATTR_INDEX_POSIX_ACL_ACCESS;
if (acl) {
error = posix_acl_update_mode(inode, &in... | 0 | [
"CWE-862",
"CWE-285"
] | linux | 073931017b49d9458aa351605b43a7e34598caef | 49,693,915,810,803,590,000,000,000,000,000,000,000 | 46 | posix_acl: Clear SGID bit when setting file permissions
When file permissions are modified via chmod(2) and the user is not in
the owning group or capable of CAP_FSETID, the setgid bit is cleared in
inode_change_ok(). Setting a POSIX ACL via setxattr(2) sets the file
permissions as well as the new ACL, but doesn't cl... |
boost::intrusive_ptr<Expression> ExpressionRegexFind::parse(ExpressionContext* const expCtx,
BSONElement expr,
const VariablesParseState& vpsIn) {
auto opName = "$regexFind"_sd;
auto [input, r... | 0 | [] | mongo | 1772b9a0393b55e6a280a35e8f0a1f75c014f301 | 59,886,930,669,959,970,000,000,000,000,000,000,000 | 8 | SERVER-49404 Enforce additional checks in $arrayToObject |
static MagickBooleanType WriteSGIImage(const ImageInfo *image_info,Image *image,
ExceptionInfo *exception)
{
CompressionType
compression;
const char
*value;
MagickBooleanType
status;
MagickOffsetType
scene;
MagickSizeType
number_pixels;
MemoryInfo
*pixel_info;
SGIInfo
i... | 0 | [
"CWE-125"
] | ImageMagick | 7afcf9f71043df15508e46f079387bd4689a738d | 209,953,745,655,143,800,000,000,000,000,000,000,000 | 289 | Prevent buffer overflow in BMP & SGI coders (bug report from pwchen&rayzhong of tencent) |
print_value(const oid * objid,
size_t objidlen, const netsnmp_variable_list * variable)
{
fprint_value(stdout, objid, objidlen, variable);
} | 0 | [
"CWE-59",
"CWE-61"
] | net-snmp | 4fd9a450444a434a993bc72f7c3486ccce41f602 | 148,721,499,248,892,470,000,000,000,000,000,000,000 | 5 | CHANGES: snmpd: Stop reading and writing the mib_indexes/* files
Caching directory contents is something the operating system should do
and is not something Net-SNMP should do. Instead of storing a copy of
the directory contents in ${tmp_dir}/mib_indexes/${n}, always scan a
MIB directory. |
std::string read_map(const std::string& name)
{
std::string res;
std::string map_location = get_wml_location("maps/" + name);
if(!map_location.empty()) {
res = read_file(map_location);
}
if (res.empty()) {
res = read_file(get_user_data_dir() + "/editor/maps/" + name);
}
return res;
} | 0 | [
"CWE-200"
] | wesnoth | af61f9fdd15cd439da9e2fe5fa39d174c923eaae | 128,705,188,463,230,370,000,000,000,000,000,000,000 | 14 | fs: Use game data path to resolve ./ in the absence of a current_dir
Fixes a file content disclosure bug (#22042) affecting functionality
relying on the get_wml_location() function and not passing a non-empty
value for the current_dir parameter.
See <https://gna.org/bugs/?22042> for details.
This is a candidate for ... |
onig_is_code_in_cc_len(int elen, OnigCodePoint code, CClassNode* cc)
{
int found;
if (elen > 1 || (code >= SINGLE_BYTE_SIZE)) {
if (IS_NULL(cc->mbuf)) {
found = 0;
}
else {
found = (onig_is_in_code_range(cc->mbuf->p, code) != 0 ? 1 : 0);
}
}
else {
found = (BITSET_AT(cc->bs, cod... | 0 | [
"CWE-125"
] | php-src | c6e34d91b88638966662caac62c4d0e90538e317 | 162,569,028,748,918,100,000,000,000,000,000,000,000 | 21 | Fix bug #77371 (heap buffer overflow in mb regex functions - compile_string_node) |
mesalink_close(struct Curl_easy *data, struct connectdata *conn, int sockindex)
{
struct ssl_connect_data *connssl = &conn->ssl[sockindex];
(void) data;
if(BACKEND->handle) {
(void)SSL_shutdown(BACKEND->handle);
SSL_free(BACKEND->handle);
BACKEND->handle = NULL;
}
if(BACKEND->ctx) {
SSL_CTX_... | 0 | [
"CWE-290"
] | curl | b09c8ee15771c614c4bf3ddac893cdb12187c844 | 72,603,266,854,869,045,000,000,000,000,000,000,000 | 16 | vtls: add 'isproxy' argument to Curl_ssl_get/addsessionid()
To make sure we set and extract the correct session.
Reported-by: Mingtao Yang
Bug: https://curl.se/docs/CVE-2021-22890.html
CVE-2021-22890 |
Expression_Obj Parser::lex_almost_any_value_chars()
{
const char* match =
lex <
one_plus <
alternatives <
sequence <
exactly <'\\'>,
any_char
>,
sequence <
negate <
sequence <
exactly < url_kwd >,
... | 0 | [
"CWE-125"
] | libsass | eb15533b07773c30dc03c9d742865604f47120ef | 92,274,722,133,024,060,000,000,000,000,000,000,000 | 51 | Fix memory leak in `parse_ie_keyword_arg`
`kwd_arg` would never get freed when there was a parse error in
`parse_ie_keyword_arg`.
Closes #2656 |
ex_rewind(exarg_T *eap)
{
do_argfile(eap, 0);
} | 0 | [
"CWE-416",
"CWE-125"
] | vim | 6f98371532fcff911b462d51bc64f2ce8a6ae682 | 312,951,016,329,057,760,000,000,000,000,000,000,000 | 4 | patch 8.2.3884: crash when clearing the argument list while using it
Problem: Crash when clearing the argument list while using it.
Solution: Lock the argument list for ":all". |
getresponse(
int opcode,
int associd,
u_short *rstatus,
int *rsize,
const char **rdata,
int timeo
)
{
struct ntp_control rpkt;
struct sock_timeval tvo;
u_short offsets[MAXFRAGS+1];
u_short counts[MAXFRAGS+1];
u_short offset;
u_short count;
size_t numfrags;
size_t f;
size_t ff;
int seenlastfrag;
int sh... | 0 | [
"CWE-20"
] | ntp | 07a5b8141e354a998a52994c3c9cd547927e56ce | 246,943,399,583,534,250,000,000,000,000,000,000,000 | 343 | [TALOS-CAN-0063] avoid buffer overrun in ntpq |
int LocatePatch(cmsIT8* it8, const char* cPatch)
{
int i;
const char *data;
TABLE* t = GetTable(it8);
for (i=0; i < t-> nPatches; i++) {
data = GetData(it8, i, t->SampleID);
if (data != NULL) {
if (cmsstrcasecmp(data, cPatch) == 0)
return i;
... | 0 | [] | Little-CMS | 65e2f1df3495edc984f7e0d7b7b24e29d851e240 | 250,160,026,499,974,070,000,000,000,000,000,000,000 | 20 | Fix some warnings from static analysis |
int ocfs2_map_page_blocks(struct page *page, u64 *p_blkno,
struct inode *inode, unsigned int from,
unsigned int to, int new)
{
int ret = 0;
struct buffer_head *head, *bh, *wait[2], **wait_bh = wait;
unsigned int block_end, block_start;
unsigned int bsize = i_blocksize(inode);
if (!page_has_buffers(page)... | 0 | [
"CWE-362"
] | linux | 3e4c56d41eef5595035872a2ec5a483f42e8917f | 271,781,297,336,558,100,000,000,000,000,000,000,000 | 91 | ocfs2: ip_alloc_sem should be taken in ocfs2_get_block()
ip_alloc_sem should be taken in ocfs2_get_block() when reading file in
DIRECT mode to prevent concurrent access to extent tree with
ocfs2_dio_end_io_write(), which may cause BUGON in the following
situation:
read file 'A' end_io... |
static NTSTATUS fcb_or_dos_open(struct smb_request *req,
connection_struct *conn,
files_struct *fsp_to_dup_into,
const struct smb_filename *smb_fname,
struct file_id id,
uint16 file_pid,
uint64_t vuid,
uint32 access_mask,
uint32 share_access,
uint32 create_options)
{
files_struct *f... | 0 | [] | samba | 60f922bf1bd8816eacbb32c24793ad1f97a1d9f2 | 301,483,066,640,694,460,000,000,000,000,000,000,000 | 57 | Fix bug #10229 - No access check verification on stream files.
https://bugzilla.samba.org/show_bug.cgi?id=10229
We need to check if the requested access mask
could be used to open the underlying file (if
it existed), as we're passing in zero for the
access mask to the base filename.
Signed-off-by: Jeremy Allison <jr... |
nfa_max_width(nfa_state_T *startstate, int depth)
{
int l, r;
nfa_state_T *state = startstate;
int len = 0;
// detect looping in a NFA_SPLIT
if (depth > 4)
return -1;
while (state != NULL)
{
switch (state->c)
{
case NFA_END_INVISIBLE:
case NFA_END_INVISIBLE_NEG:
... | 0 | [
"CWE-122"
] | vim | 65b605665997fad54ef39a93199e305af2fe4d7f | 308,180,214,366,810,300,000,000,000,000,000,000,000 | 213 | patch 8.2.3409: reading beyond end of line with invalid utf-8 character
Problem: Reading beyond end of line with invalid utf-8 character.
Solution: Check for NUL when advancing. |
int recv_files(int f_in, int f_out, char *local_name)
{
int fd1,fd2;
STRUCT_STAT st;
int iflags, xlen;
char *fname, fbuf[MAXPATHLEN];
char xname[MAXPATHLEN];
char fnametmp[MAXPATHLEN];
char *fnamecmp, *partialptr;
char fnamecmpbuf[MAXPATHLEN];
uchar fnamecmp_type;
struct file_struct *file;
int itemizing = am... | 1 | [
"CWE-862"
] | rsync | 3e06d40029cfdce9d0f73d87cfd4edaf54be9c51 | 273,331,075,093,136,400,000,000,000,000,000,000,000 | 436 | Check fname in recv_files sooner. |
const char* muxing_app() const { return muxing_app_; } | 0 | [
"CWE-20"
] | libvpx | f00890eecdf8365ea125ac16769a83aa6b68792d | 259,884,615,176,450,340,000,000,000,000,000,000,000 | 1 | update libwebm to libwebm-1.0.0.27-352-g6ab9fcf
https://chromium.googlesource.com/webm/libwebm/+log/af81f26..6ab9fcf
Change-Id: I9d56e1fbaba9b96404b4fbabefddc1a85b79c25d |
static inline MagickRealType GetPixelLuminance(
const Image *magick_restrict image,const Quantum *magick_restrict pixel)
{
MagickRealType
intensity;
if (image->colorspace != sRGBColorspace)
{
intensity=(MagickRealType) (
0.212656f*pixel[image->channel_map[RedPixelChannel].offset]+
0... | 0 | [
"CWE-20",
"CWE-125"
] | ImageMagick | 8187d2d8fd010d2d6b1a3a8edd935beec404dddc | 246,712,228,277,729,000,000,000,000,000,000,000,000 | 22 | https://github.com/ImageMagick/ImageMagick/issues/1610 |
int TS_CONF_set_ess_cert_id_chain(CONF *conf, const char *section,
TS_RESP_CTX *ctx)
{
return TS_CONF_add_flag(conf, section, ENV_ESS_CERT_ID_CHAIN,
TS_ESS_CERT_ID_CHAIN, ctx);
} | 0 | [] | openssl | c7235be6e36c4bef84594aa3b2f0561db84b63d8 | 66,759,616,209,290,450,000,000,000,000,000,000,000 | 6 | RFC 3161 compliant time stamp request creation, response generation
and response verification.
Submitted by: Zoltan Glozik <zglozik@opentsa.org>
Reviewed by: Ulf Moeller |
bool MYSQL_BIN_LOG::write(Log_event *event_info)
{
THD *thd= event_info->thd;
bool error= 1;
DBUG_ENTER("MYSQL_BIN_LOG::write(Log_event *)");
binlog_cache_data *cache_data= 0;
bool is_trans_cache= FALSE;
if (thd->binlog_evt_union.do_union)
{
/*
In Stored function; Remember that function call ca... | 0 | [
"CWE-264"
] | mysql-server | 48bd8b16fe382be302c6f0b45931be5aa6f29a0e | 184,412,300,548,071,800,000,000,000,000,000,000,000 | 191 | Bug#24388753: PRIVILEGE ESCALATION USING MYSQLD_SAFE
[This is the 5.5/5.6 version of the bugfix].
The problem was that it was possible to write log files ending
in .ini/.cnf that later could be parsed as an options file.
This made it possible for users to specify startup options
without the permissions to do so.
Thi... |
struct json_parser *json_parser_init_flags(struct istream *input,
enum json_parser_flags flags)
{
struct json_parser *parser;
parser = i_new(struct json_parser, 1);
parser->input = input;
parser->flags = flags;
parser->value = str_new(default_pool, 128);
i_array_init(&parser->nesting, 8);
i_stream_ref(i... | 0 | [] | core | 973769d74433de3c56c4ffdf4f343cb35d98e4f7 | 237,993,781,533,343,470,000,000,000,000,000,000,000 | 16 | lib: json - Escape invalid UTF-8 as unicode bytes
This prevents dovecot from crashing if invalid UTF-8 input
is given. |
static void exclusive_event_destroy(struct perf_event *event)
{
struct pmu *pmu = event->pmu;
if (!(pmu->capabilities & PERF_PMU_CAP_EXCLUSIVE))
return;
/* see comment in exclusive_event_init() */
if (event->attach_state & PERF_ATTACH_TASK)
atomic_dec(&pmu->exclusive_cnt);
else
atomic_inc(&pmu->exclusive_c... | 0 | [
"CWE-416",
"CWE-362"
] | linux | 12ca6ad2e3a896256f086497a7c7406a547ee373 | 92,140,696,613,038,580,000,000,000,000,000,000,000 | 13 | perf: Fix race in swevent hash
There's a race on CPU unplug where we free the swevent hash array
while it can still have events on. This will result in a
use-after-free which is BAD.
Simply do not free the hash array on unplug. This leaves the thing
around and no use-after-free takes place.
When the last swevent die... |
static int http_close(URLContext *h)
{
int ret = 0;
HTTPContext *s = h->priv_data;
#if CONFIG_ZLIB
inflateEnd(&s->inflate_stream);
av_freep(&s->inflate_buffer);
#endif /* CONFIG_ZLIB */
if (!s->end_chunked_post)
/* Close the write direction by sending the end of chunked encoding. */
... | 0 | [
"CWE-119",
"CWE-787"
] | FFmpeg | 2a05c8f813de6f2278827734bf8102291e7484aa | 179,324,194,456,414,040,000,000,000,000,000,000,000 | 19 | http: make length/offset-related variables unsigned.
Fixes #5992, reported and found by Paul Cher <paulcher@icloud.com>. |
static int fts3IncrmergeWriter(
Fts3Table *p, /* Fts3 table handle */
sqlite3_int64 iAbsLevel, /* Absolute level of input segments */
int iIdx, /* Index of new output segment */
Fts3MultiSegReader *pCsr, /* Cursor that data will be read from */
IncrmergeWr... | 0 | [
"CWE-787"
] | sqlite | c72f2fb7feff582444b8ffdc6c900c69847ce8a9 | 233,896,572,108,380,660,000,000,000,000,000,000,000 | 53 | More improvements to shadow table corruption detection in FTS3.
FossilOrigin-Name: 51525f9c3235967bc00a090e84c70a6400698c897aa4742e817121c725b8c99d |
e_mail_parser_inline_pgp_encrypted_class_init (EMailParserExtensionClass *class)
{
class->mime_types = parser_mime_types;
class->priority = G_PRIORITY_LOW;
class->parse = empe_inlinepgp_encrypted_parse;
} | 0 | [
"CWE-347"
] | evolution | f66cd3e1db301d264563b4222a3574e2e58e2b85 | 219,115,509,697,028,900,000,000,000,000,000,000,000 | 6 | eds-I#3 - [GPG] Mails that are not encrypted look encrypted
Related to https://gitlab.gnome.org/GNOME/evolution-data-server/issues/3 |
XListFonts(
register Display *dpy,
_Xconst char *pattern, /* null-terminated */
int maxNames,
int *actualCount) /* RETURN */
{
register long nbytes;
register unsigned i;
register int length;
char **flist = NULL;
char *ch = NULL;
char *chstart;
char *chend;
int count = 0;
xListFontsR... | 0 | [
"CWE-120"
] | libx11 | 8d2e02ae650f00c4a53deb625211a0527126c605 | 116,906,902,990,878,700,000,000,000,000,000,000,000 | 83 | Reject string longer than USHRT_MAX before sending them on the wire
The X protocol uses CARD16 values to represent the length so
this would overflow.
CVE-2021-31535
Signed-off-by: Matthieu Herrb <matthieu@herrb.eu> |
static void iscsi_timed_check_events(void *opaque)
{
IscsiLun *iscsilun = opaque;
qemu_mutex_lock(&iscsilun->mutex);
/* check for timed out requests */
iscsi_service(iscsilun->iscsi, 0);
if (iscsilun->request_timed_out) {
iscsilun->request_timed_out = false;
iscsi_reconnect(iscsil... | 0 | [
"CWE-125"
] | qemu | ff0507c239a246fd7215b31c5658fc6a3ee1e4c5 | 202,345,793,795,509,300,000,000,000,000,000,000,000 | 23 | block/iscsi:fix heap-buffer-overflow in iscsi_aio_ioctl_cb
There is an overflow, the source 'datain.data[2]' is 100 bytes,
but the 'ss' is 252 bytes.This may cause a security issue because
we can access a lot of unrelated memory data.
The len for sbp copy data should take the minimum of mx_sb_len and
sb_len_wr, no... |
tuplesort_getheaptuple(Tuplesortstate *state, bool forward, bool *should_free)
{
MemoryContext oldcontext = MemoryContextSwitchTo(state->sortcontext);
SortTuple stup;
if (!tuplesort_gettuple_common(state, forward, &stup, should_free))
stup.tuple = NULL;
MemoryContextSwitchTo(oldcontext);
return stup.tuple;
} | 0 | [
"CWE-209"
] | postgres | 804b6b6db4dcfc590a468e7be390738f9f7755fb | 77,316,442,145,180,370,000,000,000,000,000,000,000 | 12 | Fix column-privilege leak in error-message paths
While building error messages to return to the user,
BuildIndexValueDescription, ExecBuildSlotValueDescription and
ri_ReportViolation would happily include the entire key or entire row in
the result returned to the user, even if the user didn't have access to
view all o... |
static int mxf_probe(AVProbeData *p) {
const uint8_t *bufp = p->buf;
const uint8_t *end = p->buf + p->buf_size;
if (p->buf_size < sizeof(mxf_header_partition_pack_key))
return 0;
/* Must skip Run-In Sequence and search for MXF header partition pack key SMPTE 377M 5.5 */
end -= sizeof(mxf_h... | 0 | [
"CWE-703",
"CWE-834"
] | FFmpeg | 900f39692ca0337a98a7cf047e4e2611071810c2 | 127,607,476,186,933,010,000,000,000,000,000,000,000 | 24 | avformat/mxfdec: Fix DoS issues in mxf_read_index_entry_array()
Fixes: 20170829A.mxf
Co-Author: 张洪亮(望初)" <wangchu.zhl@alibaba-inc.com>
Found-by: Xiaohei and Wangchu from Alibaba Security Team
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> |
napi_status napi_create_array_with_length(napi_env env,
size_t length,
napi_value* result) {
CHECK_ENV(env);
CHECK_ARG(env, result);
*result = v8impl::JsValueFromV8LocalValue(
v8::Array::New(env->isolate, length));
retur... | 0 | [
"CWE-191"
] | node | 656260b4b65fec3b10f6da3fdc9f11fb941aafb5 | 45,306,015,157,429,580,000,000,000,000,000,000,000 | 11 | napi: fix memory corruption vulnerability
Fixes: https://hackerone.com/reports/784186
CVE-ID: CVE-2020-8174
PR-URL: https://github.com/nodejs-private/node-private/pull/195
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com>
Reviewed-By: Michael Dawson <michael_da... |
int netlink_broadcast_filtered(struct sock *ssk, struct sk_buff *skb, u32 portid,
u32 group, gfp_t allocation,
int (*filter)(struct sock *dsk, struct sk_buff *skb, void *data),
void *filter_data)
{
struct net *net = sock_net(ssk);
struct netlink_broadcast_data info;
struct sock *sk;
skb = netlink_trim(skb, allo... | 0 | [
"CWE-20",
"CWE-269"
] | linux | f3d3342602f8bcbf37d7c46641cb9bca7618eb1c | 338,188,482,453,512,380,000,000,000,000,000,000,000 | 49 | net: rework recvmsg handler msg_name and msg_namelen logic
This patch now always passes msg->msg_namelen as 0. recvmsg handlers must
set msg_namelen to the proper size <= sizeof(struct sockaddr_storage)
to return msg_name to the user.
This prevents numerous uninitialized memory leaks we had in the
recvmsg handlers an... |
spi_to_spi_gpio(const struct spi_device *spi)
{
const struct spi_bitbang *bang;
struct spi_gpio *spi_gpio;
bang = spi_master_get_devdata(spi->master);
spi_gpio = container_of(bang, struct spi_gpio, bitbang);
return spi_gpio;
} | 0 | [
"CWE-400",
"CWE-401"
] | linux | d3b0ffa1d75d5305ebe34735598993afbb8a869d | 207,008,335,852,968,850,000,000,000,000,000,000,000 | 9 | spi: gpio: prevent memory leak in spi_gpio_probe
In spi_gpio_probe an SPI master is allocated via spi_alloc_master, but
this controller should be released if devm_add_action_or_reset fails,
otherwise memory leaks. In order to avoid leak spi_contriller_put must
be called in case of failure for devm_add_action_or_reset.... |
QPDFWriter::writeString(std::string const& str)
{
this->pipeline->write(QUtil::unsigned_char_pointer(str), str.length());
} | 0 | [
"CWE-399",
"CWE-835"
] | qpdf | 8249a26d69f72b9cda584c14cc3f12769985e481 | 9,006,440,885,218,340,000,000,000,000,000,000,000 | 4 | Fix infinite loop in QPDFWriter (fixes #143) |
GF_Err iref_box_read(GF_Box *s, GF_BitStream *bs)
{
return gf_isom_box_array_read_ex(s, bs, s->type);
} | 0 | [
"CWE-401",
"CWE-787"
] | gpac | ec64c7b8966d7e4642d12debb888be5acf18efb9 | 151,005,275,945,796,140,000,000,000,000,000,000,000 | 4 | fixed #1786 (fuzz) |
/* Gets the number of bytes needed to convert a Latin-1 string to UTF-8 */
static size_t LATIN1_to_UTF8_len(const char *text)
{
size_t bytes = 1;
while (*text) {
Uint8 ch = *(const Uint8 *)text++;
if (ch <= 0x7F) {
bytes += 1;
} else {
bytes += 2;
}
}
... | 0 | [
"CWE-190",
"CWE-787"
] | SDL_ttf | db1b41ab8bde6723c24b866e466cad78c2fa0448 | 121,901,548,710,799,980,000,000,000,000,000,000,000 | 13 | More integer overflow (see bug #187)
Make sure that 'width + alignment' doesn't overflow, otherwise
it could create a SDL_Surface of 'width' but with wrong 'pitch' |
Bool gf_hevc_slice_is_intra(HEVCState *hevc)
{
switch (hevc->s_info.nal_unit_type) {
case GF_HEVC_NALU_SLICE_BLA_W_LP:
case GF_HEVC_NALU_SLICE_BLA_W_DLP:
case GF_HEVC_NALU_SLICE_BLA_N_LP:
case GF_HEVC_NALU_SLICE_IDR_W_DLP:
case GF_HEVC_NALU_SLICE_IDR_N_LP:
case GF_HEVC_NALU_SLICE_CRA:
return GF_TRUE;
default:... | 0 | [
"CWE-190",
"CWE-787"
] | gpac | 51cdb67ff7c5f1242ac58c5aa603ceaf1793b788 | 139,908,372,287,360,770,000,000,000,000,000,000,000 | 14 | add safety in avc/hevc/vvc sps/pps/vps ID check - cf #1720 #1721 #1722 |
static void __exit sm712fb_exit(void)
{
pci_unregister_driver(&smtcfb_driver);
} | 0 | [
"CWE-787"
] | linux-fbdev | bd771cf5c4254511cc4abb88f3dab3bd58bdf8e8 | 277,682,735,760,229,000,000,000,000,000,000,000,000 | 4 | video: fbdev: sm712fb: Fix crash in smtcfb_read()
Zheyu Ma reported this crash in the sm712fb driver when reading
three bytes from the framebuffer:
BUG: unable to handle page fault for address: ffffc90001ffffff
RIP: 0010:smtcfb_read+0x230/0x3e0
Call Trace:
vfs_read+0x198/0xa00
? do_sys_openat2+0x27d/0x350
? ... |
evdev_init_sendevents(struct evdev_device *device,
struct evdev_dispatch *dispatch)
{
device->base.config.sendevents = &dispatch->sendevents.config;
dispatch->sendevents.current_mode = LIBINPUT_CONFIG_SEND_EVENTS_ENABLED;
dispatch->sendevents.config.get_modes = evdev_sendevents_get_modes;
dispatch->sendeve... | 0 | [
"CWE-134"
] | libinput | a423d7d3269dc32a87384f79e29bb5ac021c83d1 | 25,128,846,315,787,880,000,000,000,000,000,000,000 | 11 | evdev: strip the device name of format directives
This fixes a format string vulnerabilty.
evdev_log_message() composes a format string consisting of a fixed
prefix (including the rendered device name) and the passed-in format
buffer. This format string is then passed with the arguments to the
actual log handler, whi... |
static void handle_wl_output_scale(void *data, struct wl_output *output,
int32_t factor) {
struct swaylock_surface *surface = data;
surface->scale = factor;
if (surface->state->run_display) {
damage_surface(surface);
}
} | 0 | [
"CWE-703"
] | swaylock | 1d1c75b6316d21933069a9d201f966d84099f6ca | 177,342,468,647,126,970,000,000,000,000,000,000,000 | 8 | Add support for ext-session-lock-v1
This is a new protocol to lock the session [1]. It should be more
reliable than layer-shell + input-inhibitor.
[1]: https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/131 |
static RedLinkInfo *reds_init_client_ssl_connection(RedsState *reds, int socket)
{
RedLinkInfo *link;
RedStreamSslStatus ssl_status;
link = reds_init_client_connection(reds, socket);
if (link == NULL) {
return NULL;
}
ssl_status = red_stream_enable_ssl(link->stream, reds->ctx);
swi... | 0 | [] | spice | ca5bbc5692e052159bce1a75f55dc60b36078749 | 5,013,509,788,085,723,400,000,000,000,000,000,000 | 37 | With OpenSSL 1.1: Disable client-initiated renegotiation.
Fixes issue #49
Fixes BZ#1904459
Signed-off-by: Julien Ropé <jrope@redhat.com>
Reported-by: BlackKD
Acked-by: Frediano Ziglio <fziglio@redhat.com> |
static int sctp_inet6addr_event(struct notifier_block *this, unsigned long ev,
void *ptr)
{
struct inet6_ifaddr *ifa = (struct inet6_ifaddr *)ptr;
struct sctp_sockaddr_entry *addr = NULL;
struct sctp_sockaddr_entry *temp;
struct net *net = dev_net(ifa->idev->dev);
int found = 0;
switch (ev) {
case NETDEV_UP... | 0 | [
"CWE-310"
] | net | 95ee62083cb6453e056562d91f597552021e6ae7 | 148,054,563,526,573,050,000,000,000,000,000,000,000 | 46 | net: sctp: fix ipv6 ipsec encryption bug in sctp_v6_xmit
Alan Chester reported an issue with IPv6 on SCTP that IPsec traffic is not
being encrypted, whereas on IPv4 it is. Setting up an AH + ESP transport
does not seem to have the desired effect:
SCTP + IPv4:
22:14:20.809645 IP (tos 0x2,ECT(0), ttl 64, id 0, offse... |
void textview_show_error(TextView *textview)
{
GtkTextView *text;
GtkTextBuffer *buffer;
GtkTextIter iter;
textview_set_font(textview, NULL);
textview_clear(textview);
text = GTK_TEXT_VIEW(textview->text);
buffer = gtk_text_view_get_buffer(text);
gtk_text_buffer_get_start_iter(buffer, &iter);
TEXTVIEW_INSER... | 0 | [
"CWE-601"
] | claws | ac286a71ed78429e16c612161251b9ea90ccd431 | 9,182,311,373,386,555,000,000,000,000,000,000,000 | 22 | harden link checker before accepting click |
static int __mark_chain_precision(struct bpf_verifier_env *env, int regno,
int spi)
{
struct bpf_verifier_state *st = env->cur_state;
int first_idx = st->first_insn_idx;
int last_idx = env->insn_idx;
struct bpf_func_state *func;
struct bpf_reg_state *reg;
u32 reg_mask = regno >= 0 ? 1u << regno : 0;
u64 st... | 0 | [] | linux | 294f2fc6da27620a506e6c050241655459ccd6bd | 3,851,777,118,315,206,000,000,000,000,000,000,000 | 162 | bpf: Verifer, adjust_scalar_min_max_vals to always call update_reg_bounds()
Currently, for all op verification we call __red_deduce_bounds() and
__red_bound_offset() but we only call __update_reg_bounds() in bitwise
ops. However, we could benefit from calling __update_reg_bounds() in
BPF_ADD, BPF_SUB, and BPF_MUL case... |
RGWOp *RGWHandler_REST_Obj_SWIFT::op_get()
{
return get_obj_op(true);
} | 0 | [
"CWE-617"
] | ceph | f44a8ae8aa27ecef69528db9aec220f12492810e | 225,871,141,364,726,040,000,000,000,000,000,000,000 | 4 | rgw: RGWSwiftWebsiteHandler::is_web_dir checks empty subdir_name
checking for empty name avoids later assertion in RGWObjectCtx::set_atomic
Fixes: CVE-2021-3531
Reviewed-by: Casey Bodley <cbodley@redhat.com>
Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit 7196a469b4470f3c8628489df9a41ec8b... |
static loff_t snd_disconnect_llseek(struct file *file, loff_t offset, int orig)
{
return -ENODEV;
} | 0 | [
"CWE-416"
] | linux | 2a3f7221acddfe1caa9ff09b3a8158c39b2fdeac | 197,374,088,536,846,440,000,000,000,000,000,000,000 | 4 | ALSA: core: Fix card races between register and disconnect
There is a small race window in the card disconnection code that
allows the registration of another card with the very same card id.
This leads to a warning in procfs creation as caught by syzkaller.
The problem is that we delete snd_cards and snd_cards_lock ... |
void sk_common_release(struct sock *sk)
{
if (sk->sk_prot->destroy)
sk->sk_prot->destroy(sk);
/*
* Observation: when sk_common_release is called, processes have
* no access to socket. But net still has.
* Step one, detach it from networking:
*
* A. Remove from hash tables.
*/
sk->sk_prot->unhash(sk);... | 0 | [] | net | 35306eb23814444bd4021f8a1c3047d3cb0c8b2b | 61,413,773,306,342,160,000,000,000,000,000,000,000 | 35 | af_unix: fix races in sk_peer_pid and sk_peer_cred accesses
Jann Horn reported that SO_PEERCRED and SO_PEERGROUPS implementations
are racy, as af_unix can concurrently change sk_peer_pid and sk_peer_cred.
In order to fix this issue, this patch adds a new spinlock that needs
to be used whenever these fields are read o... |
rpc_C_VerifyRecover (CK_X_FUNCTION_LIST *self,
p11_rpc_message *msg)
{
CK_SESSION_HANDLE session;
CK_BYTE_PTR signature;
CK_ULONG signature_len;
CK_BYTE_PTR data;
CK_ULONG data_len;
BEGIN_CALL (VerifyRecover);
IN_ULONG (session);
IN_BYTE_ARRAY (signature, signature_len);
IN_BYTE_BUFFER... | 0 | [
"CWE-190"
] | p11-kit | 5307a1d21a50cacd06f471a873a018d23ba4b963 | 256,995,887,067,967,900,000,000,000,000,000,000,000 | 17 | Check for arithmetic overflows before allocating |
flatpak_bwrap_append_args (FlatpakBwrap *bwrap,
GPtrArray *other_array)
{
flatpak_bwrap_append_argsv (bwrap,
(char **) other_array->pdata,
other_array->len);
} | 0 | [
"CWE-94",
"CWE-74"
] | flatpak | 6d1773d2a54dde9b099043f07a2094a4f1c2f486 | 304,405,174,509,165,600,000,000,000,000,000,000,000 | 7 | run: Convert all environment variables into bwrap arguments
This avoids some of them being filtered out by a setuid bwrap. It also
means that if they came from an untrusted source, they cannot be used
to inject arbitrary code into a non-setuid bwrap via mechanisms like
LD_PRELOAD.
Because they get bundled into a memf... |
void OSDService::agent_entry()
{
dout(10) << __func__ << " start" << dendl;
agent_lock.Lock();
while (!agent_stop_flag) {
if (agent_queue.empty()) {
dout(20) << __func__ << " empty queue" << dendl;
agent_cond.Wait(agent_lock);
continue;
}
uint64_t level = agent_queue.rbegin()->first... | 0 | [
"CWE-287",
"CWE-284"
] | ceph | 5ead97120e07054d80623dada90a5cc764c28468 | 73,567,545,470,723,240,000,000,000,000,000,000,000 | 57 | auth/cephx: add authorizer challenge
Allow the accepting side of a connection to reject an initial authorizer
with a random challenge. The connecting side then has to respond with an
updated authorizer proving they are able to decrypt the service's challenge
and that the new authorizer was produced for this specific ... |
nautilus_file_invalidate_attributes (NautilusFile *file,
NautilusFileAttributes file_attributes)
{
/* Cancel possible in-progress loads of any of these attributes */
nautilus_directory_cancel_loading_file_attributes (file->details->directory,
file,
file_attributes);
/* Actually invalid... | 0 | [] | nautilus | 7632a3e13874a2c5e8988428ca913620a25df983 | 286,187,970,677,181,260,000,000,000,000,000,000,000 | 16 | Check for trusted desktop file launchers.
2009-02-24 Alexander Larsson <alexl@redhat.com>
* libnautilus-private/nautilus-directory-async.c:
Check for trusted desktop file launchers.
* libnautilus-private/nautilus-file-private.h:
* libnautilus-private/nautilus-file.c:
* libnautilus-... |
static enum PHY_DEVICE_TYPE getPhyType(struct ql3_adapter *qdev,
u16 phyIdReg0, u16 phyIdReg1)
{
enum PHY_DEVICE_TYPE result = PHY_TYPE_UNKNOWN;
u32 oui;
u16 model;
int i;
if (phyIdReg0 == 0xffff)
return result;
if (phyIdReg1 == 0xffff)
return result;
/* oui is split between two registers *... | 0 | [
"CWE-401"
] | linux | 1acb8f2a7a9f10543868ddd737e37424d5c36cf4 | 7,524,858,427,995,455,000,000,000,000,000,000,000 | 32 | net: qlogic: Fix memory leak in ql_alloc_large_buffers
In ql_alloc_large_buffers, a new skb is allocated via netdev_alloc_skb.
This skb should be released if pci_dma_mapping_error fails.
Fixes: 0f8ab89e825f ("qla3xxx: Check return code from pci_map_single() in ql_release_to_lrg_buf_free_list(), ql_populate_free_queue... |
static void gp_query_free(struct gp_query *q, bool free_buffer)
{
if (!q) {
return;
}
if (free_buffer) {
free(q->buffer);
}
free(q);
} | 0 | [
"CWE-667"
] | gssproxy | cb761412e299ef907f22cd7c4146d50c8a792003 | 335,477,894,849,075,370,000,000,000,000,000,000,000 | 12 | Unlock cond_mutex before pthread exit in gp_worker_main()
Signed-off-by: GuiYao <guiyao@huawei.com>
[rharwood@redhat.com: whitespace, tweak commit message]
Reviewed-by: Robbie Harwood <rharwood@redhat.com> |
ex_put(exarg_T *eap)
{
/* ":0put" works like ":1put!". */
if (eap->line2 == 0)
{
eap->line2 = 1;
eap->forceit = TRUE;
}
curwin->w_cursor.lnum = eap->line2;
do_put(eap->regname, eap->forceit ? BACKWARD : FORWARD, 1L,
PUT_LINE|PUT_CURSLINE);
} | 0 | [
"CWE-78"
] | vim | 8c62a08faf89663e5633dc5036cd8695c80f1075 | 321,405,320,342,203,200,000,000,000,000,000,000,000 | 12 | patch 8.1.0881: can execute shell commands in rvim through interfaces
Problem: Can execute shell commands in rvim through interfaces.
Solution: Disable using interfaces in restricted mode. Allow for writing
file with writefile(), histadd() and a few others. |
Error HeifContext::add_exif_metadata(std::shared_ptr<Image> master_image, const void* data, int size)
{
// find location of TIFF header
uint32_t offset = 0;
const char * tiffmagic1 = "MM\0*";
const char * tiffmagic2 = "II*\0";
while (offset+4 < (unsigned int)size) {
if (!memcmp( (uint8_t *) data + off... | 0 | [
"CWE-125"
] | libheif | f7399b62d7fbc596f1b2871578c1d2053bedf1dd | 205,897,947,178,222,600,000,000,000,000,000,000,000 | 47 | Handle case where referenced "iref" box doesn't exist (fixes #138). |
verify_s4u2self_reply(krb5_context context,
krb5_keyblock *subkey,
krb5_pa_s4u_x509_user *req_s4u_user,
krb5_pa_data **rep_padata,
krb5_pa_data **enc_padata)
{
krb5_error_code code;
krb5_pa_data *rep_s4u_padata, *enc_s4u_pad... | 0 | [
"CWE-617",
"CWE-703"
] | krb5 | 5e6d1796106df8ba6bc1973ee0917c170d929086 | 204,909,687,527,899,050,000,000,000,000,000,000,000 | 114 | Ignore password attributes for S4U2Self requests
For consistency with Windows KDCs, allow protocol transition to work
even if the password has expired or needs changing.
Also, when looking up an enterprise principal with an AS request,
treat ERR_KEY_EXP as confirmation that the client is present in the
realm.
[ghuds... |
set_no_hlsearch(int flag)
{
no_hlsearch = flag;
# ifdef FEAT_EVAL
set_vim_var_nr(VV_HLSEARCH, !no_hlsearch && p_hls);
# endif
} | 0 | [
"CWE-78"
] | vim | 8c62a08faf89663e5633dc5036cd8695c80f1075 | 83,720,133,173,427,220,000,000,000,000,000,000,000 | 7 | patch 8.1.0881: can execute shell commands in rvim through interfaces
Problem: Can execute shell commands in rvim through interfaces.
Solution: Disable using interfaces in restricted mode. Allow for writing
file with writefile(), histadd() and a few others. |
static int cgroup_freeze_show(struct seq_file *seq, void *v)
{
struct cgroup *cgrp = seq_css(seq)->cgroup;
seq_printf(seq, "%d\n", cgrp->freezer.freeze);
return 0;
} | 0 | [
"CWE-416"
] | linux | a06247c6804f1a7c86a2e5398a4c1f1db1471848 | 293,191,535,410,307,500,000,000,000,000,000,000,000 | 8 | psi: Fix uaf issue when psi trigger is destroyed while being polled
With write operation on psi files replacing old trigger with a new one,
the lifetime of its waitqueue is totally arbitrary. Overwriting an
existing trigger causes its waitqueue to be freed and pending poll()
will stumble on trigger->event_wait which w... |
TEST_P(RedirectIntegrationTest, InvalidRedirect) {
useAccessLog("%RESPONSE_CODE% %RESPONSE_CODE_DETAILS% %RESP(test-header)%");
initialize();
redirect_response_.setLocation("invalid_url");
// Send the same request as above, only send an invalid URL as the response.
// The request should not be redirected.
... | 0 | [
"CWE-703"
] | envoy | 18871dbfb168d3512a10c78dd267ff7c03f564c6 | 153,435,556,870,126,130,000,000,000,000,000,000,000 | 21 | [1.18] CVE-2022-21655
Crash with direct_response
Signed-off-by: Otto van der Schaaf <ovanders@redhat.com> |
struct sk_buff *nf_ct_frag6_gather(struct sk_buff *skb, u32 user)
{
struct sk_buff *clone;
struct net_device *dev = skb->dev;
struct frag_hdr *fhdr;
struct nf_ct_frag6_queue *fq;
struct ipv6hdr *hdr;
int fhoff, nhoff;
u8 prevhdr;
struct sk_buff *ret_skb = NULL;
/* Jumbo payload inhibits frag. header */
if (i... | 0 | [] | linux-2.6 | 9e2dcf72023d1447f09c47d77c99b0c49659e5ce | 281,737,547,013,594,000,000,000,000,000,000,000,000 | 70 | netfilter: nf_conntrack_reasm: properly handle packets fragmented into a single fragment
When an ICMPV6_PKT_TOOBIG message is received with a MTU below 1280,
all further packets include a fragment header.
Unlike regular defragmentation, conntrack also needs to "reassemble"
those fragments in order to obtain a packet ... |
static int cli_full_connection_state_destructor(
struct cli_full_connection_state *s)
{
if (s->cli != NULL) {
cli_shutdown(s->cli);
s->cli = NULL;
}
return 0;
} | 0 | [
"CWE-94"
] | samba | 94295b7aa22d2544af5323bca70d3dcb97fd7c64 | 289,204,393,311,398,530,000,000,000,000,000,000,000 | 9 | CVE-2016-2019: s3:libsmb: add comment regarding smbXcli_session_is_guest() with mandatory signing
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11860
Signed-off-by: Stefan Metzmacher <metze@samba.org> |
static int ZEND_FASTCALL ZEND_IS_NOT_EQUAL_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
zend_op *opline = EX(opline);
zval *result = &EX_T(opline->result.u.var).tmp_var;
compare_function(result,
&opline->op1.u.constant,
&opline->op2.u.constant TSRMLS_CC);
ZVAL_BOOL(result, (Z_LVAL_P(result) != 0));
... | 0 | [] | php-src | ce96fd6b0761d98353761bf78d5bfb55291179fd | 271,887,936,884,949,670,000,000,000,000,000,000,000 | 14 | - fix #39863, do not accept paths with NULL in them. See http://news.php.net/php.internals/50191, trunk will have the patch later (adding a macro and/or changing (some) APIs. Patch by Rasmus |
mprint(struct magic_set *ms, struct magic *m)
{
uint64_t v;
float vf;
double vd;
int64_t t = 0;
char buf[128], tbuf[26];
union VALUETYPE *p = &ms->ms_value;
switch (m->type) {
case FILE_BYTE:
v = file_signextend(ms, m, (uint64_t)p->b);
switch (check_fmt(ms, m)) {
case -1:
return -1;
case 1:
... | 0 | [
"CWE-755"
] | file | 3c081560c23f20b2985c285338b52c7aae9fdb0f | 62,553,514,924,111,200,000,000,000,000,000,000,000 | 273 | prevent infinite recursion. |
cifs_mount(struct super_block *sb, struct cifs_sb_info *cifs_sb,
char *mount_data_global, const char *devname)
{
int rc;
int xid;
struct smb_vol *volume_info;
struct cifsSesInfo *pSesInfo;
struct cifsTconInfo *tcon;
struct TCP_Server_Info *srvTcp;
char *full_path;
char *mount_data = mount_data_global;
#ifde... | 0 | [
"CWE-284",
"CWE-264"
] | linux | 4ff67b720c02c36e54d55b88c2931879b7db1cd2 | 128,261,764,310,867,990,000,000,000,000,000,000,000 | 233 | cifs: clean up cifs_find_smb_ses (try #2)
This patch replaces the earlier patch by the same name. The only
difference is that MAX_PASSWORD_SIZE has been increased to attempt to
match the limits that windows enforces.
Do a better job of matching sessions by authtype. Matching by username
for a Kerberos session is inco... |
int do_xdp_generic(struct bpf_prog *xdp_prog, struct sk_buff *skb)
{
if (xdp_prog) {
struct xdp_buff xdp;
u32 act;
int err;
act = netif_receive_generic_xdp(skb, &xdp, xdp_prog);
if (act != XDP_PASS) {
switch (act) {
case XDP_REDIRECT:
err = xdp_do_generic_redirect(skb->dev, skb,
&xdp... | 0 | [
"CWE-416"
] | linux | a4270d6795b0580287453ea55974d948393e66ef | 338,282,723,578,482,760,000,000,000,000,000,000,000 | 28 | net-gro: fix use-after-free read in napi_gro_frags()
If a network driver provides to napi_gro_frags() an
skb with a page fragment of exactly 14 bytes, the call
to gro_pull_from_frag0() will 'consume' the fragment
by calling skb_frag_unref(skb, 0), and the page might
be freed and reused.
Reading eth->h_proto at the en... |
apr_status_t h2_mplx_dispatch_master_events(h2_mplx *m,
stream_ev_callback *on_resume,
void *on_ctx)
{
h2_stream *stream;
int n, id;
ap_log_cerror(APLOG_MARK, APLOG_TRACE2, 0, m->c,
"h2_mplx(%ld... | 0 | [
"CWE-444"
] | mod_h2 | 825de6a46027b2f4c30d7ff5a0c8b852d639c207 | 256,019,800,683,841,700,000,000,000,000,000,000,000 | 27 | * Fixed keepalives counter on slave connections. |
void KrecipesView::createShoppingListFromDiet( void )
{
shoppingListPanel->createShopping( dietPanel->dietList() );
slotSetPanel( ShoppingP );
} | 0 | [] | krecipes | cd1490fb5fe82cbe9172a43be13298001b446ecd | 233,973,924,670,498,770,000,000,000,000,000,000,000 | 5 | Use WebKit instead of KHTML for printing recipes, fixes sourceforge #2990118 and
#2960140.
svn path=/trunk/extragear/utils/krecipes/; revision=1137824 |
T& _at(const int offset) {
const unsigned int siz = (unsigned int)size();
return (*this)[offset<0?0:(unsigned int)offset>=siz?siz - 1:offset];
} | 0 | [
"CWE-770"
] | cimg | 619cb58dd90b4e03ac68286c70ed98acbefd1c90 | 233,418,845,464,528,870,000,000,000,000,000,000,000 | 4 | CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size. |
int wc_ecc_verify_hash_ex(mp_int *r, mp_int *s, const byte* hash,
word32 hashlen, int* res, ecc_key* key)
{
int err;
#ifdef WOLFSSL_ATECC508A
byte sigRS[ATECC_KEY_SIZE*2];
#elif !defined(WOLFSSL_SP_MATH)
int did_init = 0;
ecc_point *mG = NULL, *mQ = NULL;
mp_int ... | 0 | [
"CWE-200"
] | wolfssl | 9b9568d500f31f964af26ba8d01e542e1f27e5ca | 35,211,831,911,074,315,000,000,000,000,000,000,000 | 291 | Change ECDSA signing to use blinding. |
onig_compile(regex_t* reg, const UChar* pattern, const UChar* pattern_end,
OnigErrorInfo* einfo)
{
int r;
Node* root;
ScanEnv scan_env;
#ifdef USE_CALL
UnsetAddrList uslist = {0};
#endif
root = 0;
if (IS_NOT_NULL(einfo)) {
einfo->enc = reg->enc;
einfo->par = (UChar* )NULL;
}
#ifd... | 0 | [
"CWE-787"
] | oniguruma | cbe9f8bd9cfc6c3c87a60fbae58fa1a85db59df0 | 296,941,457,804,526,460,000,000,000,000,000,000,000 | 211 | #207: Out-of-bounds write |
MagickExport Image *PolynomialImage(const Image *images,
const size_t number_terms,const double *terms,ExceptionInfo *exception)
{
#define PolynomialImageTag "Polynomial/Image"
CacheView
*polynomial_view;
Image
*image;
MagickBooleanType
status;
MagickOffsetType
progress;
PixelChannels
... | 0 | [] | ImageMagick | 4717744e4bb27de8ea978e51c6d5bcddf62ffe49 | 118,572,384,476,724,950,000,000,000,000,000,000,000 | 180 | https://github.com/ImageMagick/ImageMagick/issues/3332 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.